Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: extract TRIGSTRs #40

Open
Cokemonkey11 opened this issue Jul 12, 2018 · 11 comments
Open

feature request: extract TRIGSTRs #40

Cokemonkey11 opened this issue Jul 12, 2018 · 11 comments

Comments

@Cokemonkey11
Copy link

Would be useful for migrating old maps and it should be fairly trivial to do, I would think?

@Frotty
Copy link
Member

Frotty commented Jul 12, 2018

do you mean just plain extract? why not use an mpq editor?

@Cokemonkey11
Copy link
Author

I meant to extract and replace "TRIGSTR_003" in wurst, with contents of map strings. (Strings get created by GUI AFAIK)

@Frotty
Copy link
Member

Frotty commented Jul 12, 2018

Already done for wurst created objects. Inlining of WTS entries is more a task for the finalizer, not compiler imo.

@Cokemonkey11
Copy link
Author

Hmm, I was thinking just a tool in the editor. But extracting to a file would be fine too. I don't care too much how it's done.

@Frotty
Copy link
Member

Frotty commented Jul 19, 2018

I still don't get it.

I meant to extract and replace "TRIGSTR_003" in wurst

In wurst? What does that even mean?

Hmm, I was thinking just a tool in the editor

So a command just to extract the .wts from a map? Why?

Maybe write a user story of what you're actually trying to accomplish. Seems pretty pointless to me.

(Strings get created by GUI AFAIK)

They get created by the world editor in all sorts of places

@peq
Copy link
Collaborator

peq commented Jul 19, 2018

I think the story is something like this:

  1. have map written in GUI
  2. convert to Jass files
  3. replace TRIGSTRs with new tool
  4. start rewriting Jass to Jurst/Wurst
  5. ???
  6. profit

@Frotty
Copy link
Member

Frotty commented Jul 19, 2018

Ah okay, GUI.
I was confused because nonGUI map code only contains like 4 TRIGSTRs.
But who converts GUI maps to wurst?

@Cokemonkey11
Copy link
Author

But who converts GUI maps to wurst?

I did, here: https://www.hiveworkshop.com/pastebin/575155029c53ff3ff4364546b25ed4bc16336/

It was for the contest, which had a theme "Update a map that is 15 years old".

In this case it was particularly annoying because the starting map was a cinematic with hundreds of TRIGSTRs

@Krypt0n
Copy link

Krypt0n commented Feb 12, 2019

@Cokemonkey11
Copy link
Author

Just from skimming that code, it looks like it won't work if you have two TRIGSTR on the same line

@Krypt0n
Copy link

Krypt0n commented Mar 22, 2019

that is true, I used it only once, may need adaptions to other situations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants