• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Tool for generating objects

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Is there a tool available that takes text as input to generate custom objects, e.g. units, etc.?

It would be nice to have some portability for all the custom units, abilities, etc.

And also said tool should work with Jass new gen pack, so I would open the map, and then load in all the custom objects from some file that I generated with said tool.
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
There are lua codes I believe for that...

but if you simply want to transfer between maps, you can always just export object data...

I'd just like to handle object generation automatically, so if I need to change a certain parameter of a unit, I'd just edit a script, rather than go through each object and change that field value.

What are these lua scripts?
 
Level 15
Joined
Aug 7, 2013
Messages
1,338

Is there a way to convert an already made custom object into this lua script, that way I don't need to go and write out all the fields?

And what is this about??

Use it with caution. I recommend using it on blank test maps prior to using it on the actual map, and creating backups of the map before running lua. This is just a caution-measure in case an infinite loop is ran, which will destroy your map. An even better solution is to use a source code editor that supports Lua, such as NotePad ++.
 
Is there a way to convert an already made custom object into this lua script, that way I don't need to go and write out all the fields?

No

sethmachine said:
And what is this about??

If you run into an infinite loop, it might mess up things. It is writing directly to the map, not to a copy.

You may want to look at wurst's compiletime functions--they are a bit more intuitive and have a much better API (see Crigges' post).
 
Level 8
Joined
Nov 20, 2011
Messages
202
Is there a way to convert an already made custom object into this lua script, that way I don't need to go and write out all the fields?

And what is this about??

Well this is no problem if you use wurst compiletime functions. You can generate this functions for existing objects. You just need to enable compiletime functions and save the map. While saving txt files will be automaticly generated next to you map
 
  • Like
Reactions: peq
Status
Not open for further replies.
Top