• 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.

[General] Editing a mod

Status
Not open for further replies.
Level 3
Joined
Jan 16, 2023
Messages
14
Hey, there is a map that I want to make adjustments to, there is a tradition for this to happen with the map, it's gone through a number of iterations with different modders. To this end I have some considerations:
1. I would ideally want to contact any of the previous modders to see if they'd be cool with it, and potentially get advice. Is there any sort of network or way of contacting modders?
2. When I open the map in the editor it runs, but once I make any alteration, it says it doesn't recognize some "map_name" code thing, even if the alteration didn't have anything to do with that part of the code. Anyone know what could be causing something like that.
 
Level 3
Joined
Jan 16, 2023
Messages
14
Blizzard is dumb as fuck.
That's an understatement :D
Thanks for the suggestion but I have them both enabled and it still says "Undeclared variable udg_MapName". I haven't changed any code at this point, but it's still showing this after I edit the code and put it back to how it was at the start, e.g. by adding a space and deleting it again.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
It will be much easier to diagnose the problem if you can post the map here for others to try to save. At the very least show screenshots of the errors it gives and where in the code it says that error is.
1. I would ideally want to contact any of the previous modders to see if they'd be cool with it, and potentially get advice. Is there any sort of network or way of contacting modders?
The only thing you can really do is hope to find a community they are currently a part of or a community they used to be active in and hope they respond to a message. Depending on the map's popularity, when it was made, and what language(s) the creator(s) spoke you might be able to narrow down potential websites or discord servers, but it's a daunting task if you have nothing to go on. They might have left some contact details somewhere in a trigger or code comment as well.
 
Level 3
Joined
Jan 16, 2023
Messages
14
It will be much easier to diagnose the problem if you can post the map here for others to try to save. At the very least show screenshots of the errors it gives and where in the code it says that error is.

The only thing you can really do is hope to find a community they are currently a part of or a community they used to be active in and hope they respond to a message. Depending on the map's popularity, when it was made, and what language(s) the creator(s) spoke you might be able to narrow down potential websites or discord servers, but it's a daunting task if you have nothing to go on. They might have left some contact details somewhere in a trigger or code comment as well.
Sorry, here's a version of the map that's working and I went in and added a single space at the very end of the file which gave this error
1677305917542.png

and then I deleted the space and enabled Jasshelper and vJass and now it actually opens, but the map is bricked.
 

Attachments

  • Random Farm TD 0.57.w3x
    2.2 MB · Views: 6
Level 45
Joined
Feb 27, 2007
Messages
5,578
So the error is because it expects a string variable named MapName to exist, which it references in that line as part of the process that writes data about your game to a text file in your filesystem. During the deprotection process that produced this editable version of the map, all of the other variable names were converted to generic names like integer23 and unit12 because they were used by GUI triggers. That particular variable was only ever referred to in JASS custom functions, so it did not get converted. You can fix this error by creating a string variable called MapName and giving it any default value.

This is actually not related to the crash upon map start—that turns out to be intentional. At least as far as I can tell, one of the mapmakers decided to make the game crash when loaded under specific conditions; presumably this was to either prevent playing it in single player or to fuck over anyone who deprotected it and tried to change something.

Trigger90 is executed via timer event 0.01s after the initialization function concludes and checks if the values of integer30 and integer40 are the same. If they aren't the same and the map is not currently being run by a player with the name "latsyrc2", then it gives 8 modified tomes of experience to a special farmer unit owned by Player 12. Since this unit is not a hero, giving it a tome of experience crashes the game (detail and ways around this here). I can't find anywhere that removes this unit or gives it an expiration timer, and I cannot see it in the game if I disable the tome-adding line and set its OE scaling value to 10; it's definitely not there after this occurs so it must be cleaned up by one of the region-based triggers. Integer30 is the handle id of a location created at 0,0 on map init, and integer40 is specifically 1050546.

To resolve this you just need to comment out the line that adds the tomes:
JASS:
//call UnitAddItemByIdSwapped('texp',udg_unit12)
You can find this line easily by copying all the trigger text into a text editor and searching for 'texp' or unit12. After adding the // at the start of it, copy the entire trigger text back to your clipboard, go to the trigger editor and delete the whole text of the trigger, and paste into the (now blank) trigger. Just pasting over the entire original text in the trigger editor is liable not to work because (again) Blizzard is dumb as fuck.
 
Last edited:
Level 3
Joined
Jan 16, 2023
Messages
14
So the error is because it expects a string variable named MapName to exist, which it references in that line as part of the process that writes data about your game to a text file in your filesystem. During the deprotection process that produced this editable version of the map, all of the other variable names were converted to generic names like integer23 and unit12 because they were used by GUI triggers. That particular variable was only ever referred to in JASS custom function, so it did not get converted. You can fix this error by creating a string variable called MapName and giving it any default value.

This actually not related to the crash upon map start—that turns out to be intentional. At least as far as I can tell, one of the mapmakers decided to make the game crash when loaded under specific conditions; presumably this was to either prevent playing it in single player or to fuck over anyone who deprotected it and tried to change something.

Trigger90 is executed via timer event 0.01s after the initialization function concludes and checks if the values of integer30 and integer40 are the same. If they aren't the same and the map is not currently being run by a player with the name "latsyrc2", then it gives 8 modified tomes of experience to a special farmer unit owned by Player 12. Since this unit is not a hero, giving it a tome of experience crashes the game (detail and ways around this here). I can't find anywhere that removes this unit or gives it an expiration timer, and I cannot see it in the game if I disable the tome-adding line and set its OE scaling value to 10; it's definitely not there after this occurs so it must be cleaned up by one of the region-based triggers. Integer30 is the handle id of a location created at 0,0 on map init, and integer40 is specifically 1050546.

To resolve this you just need to comment out the line that adds the tomes:
JASS:
//call UnitAddItemByIdSwapped('texp',udg_unit12)
You can find this line easily by copying all the trigger text into a text editor and searching for 'texp' or unit12. After adding the // at the start of it, copy the entire trigger text back to your clipboard, go to the trigger editor and delete the whole text of the trigger, and paste into the (now blank) trigger. Just pasting over the entire original text in the trigger editor is liable not to work because (again) Blizzard is dumb as fuck.
Wow, you're a legend dude. You're like Tank in the Matrix making sense of random symbols. Thanks a lot.
 
Status
Not open for further replies.
Top