| 09-01-2007, 02:58 AM | #1 |
Quite simple; how do i get the name of my map via trigger only? There seem to be a SetMapName function; but no GetMapName function. thanks in advance! |
| 09-01-2007, 04:21 AM | #2 |
That depends.. WHY do you need map name? Can't you just set a variable to the name of your map, and then get it to read the Variable? |
| 09-01-2007, 04:45 AM | #3 |
it's for another method of map protection. Protection from further de-protection. |
| 09-01-2007, 04:56 AM | #4 |
Ahh! I see, something like if the map name isn't equal to the original name you gave it, it'll cease to work? I dunno, maybe there's something in game cache? But ask a JASSer, As I don't really have any experience with anything beside GUI. |
| 09-01-2007, 05:13 AM | #5 |
string 12(or not, this affected by map itself, but its static - always same from game to game) from global string table. |
| 09-01-2007, 04:52 PM | #6 |
Eureka! I found a way; all thanks to Ammorth. |
| 09-01-2007, 05:46 PM | #7 |
For those who still dont know: hm if u open the war3map.j u will see a function called config, this will be called before u load the map. And it tells u the map name is always or most likely stored in TRIGSTR_001. so if u wanna display map name then u can do: JASS:call BJDebugMsg("TRIGSTR_001") there is always ways to exploit this tho. You can just open war3map.j and modify the function tat calls SetMapName(...) and voila, u can copy map and change name ^^ |
| 09-01-2007, 09:03 PM | #8 |
you cant use this if map was optimized, vex opt move all string direct to code. |
| 09-01-2007, 11:21 PM | #9 |
Yes, but my method which I gave him would work, so it doesn't matter. |
| 09-02-2007, 04:22 AM | #10 | |
Quote:
it will always work, you just need to track down the SetMapName native, and from there track further. But if Vex Optimizer move strings then it will also bug the map name getting method, cus it will be local then. example: JASS:call SetMapName("Name Of Map") |
| 09-02-2007, 05:28 AM | #11 |
every string passed to game will be registered in string table permanently, soo with return bug you may extract it by its number. |
| 09-02-2007, 02:12 PM | #12 | |
Quote:
Except if a map is loaded, the strings are regenerated. It is still possible to return the old strings, but they will not equal a string that was created after the load, even if they are the same text. |
| 09-02-2007, 09:31 PM | #13 |
extract string and then save somewhere for savekeep. |
