| 03-13-2005, 04:54 AM | #1 |
![]() This program will inline as many trigger strings as possible into war3map.j, war3map.w3a, war3map.w3h, war3map.w3i, war3map.w3q, war3map.w3t, war3map.w3u and war3mapSkin.txt hopefully decreasing the time to load the map especially for complex maps. Impact varies from map to map, but has greatest effect on a map that was under constant change and has a lot of strings (for example, DotA Allstars, where this technique had cut the load time to about a third). True.Rus was the first to optimize a map like that. The idea for this program came to me when someone posted a version of DotA Allstars modified by him on the DotA Allstars-Forums, although I haven't looked into the map(s) modified by True.Rus. This tool should be used on the map before it is protected. Some protections will lower the effectiveness of this tool or even make it crash. I've done some testing and everything seems to be stable and working, but dont blame me when this tool corrupts your map. http://www.wc3banlist.de/files/WTSInliner.zip The source is also available. It is written in Delphi 2005 but it should be compatible with older versions too. http://www.wc3banlist.de/files/WTSInliner-src.zip Feedback is appreciated! |
| 03-15-2005, 04:51 AM | #2 |
hmm i'll try it out. shortened loading time never hurts, and i plan to have an immense amount of text in various parts of my map :D |
| 03-15-2005, 09:23 AM | #3 |
-not found strings can be set to "" instead of stopping the whole process (because in game the exact same thing happens with missing references) -multiple line strings can be inlined in the script (just replace all line breaks (CRLFs) by \n) -war3mapSkin.txt contains a lot of wts references too (error messages, global game strings) Other than that it looks quite good. |
| 03-15-2005, 06:19 PM | #4 |
Thanks . I'll fix that ASAP.Update! Changes in 1.0.2 - Support for maps which have war3map.j in the Scripts folder - Support for inlining into war3mapSkin.txt - Support for inlining multiline strings into all files except war3mapSkin.txt - Missing strings do no longer stop the whole process. References to missing strings are removed. - Now retains every string in war3map.wts that was skipped during inlining instead of removing all strings that were inlined. - No string greater than 1023 bytes will be inlined, because Warcraft III crashes when trying to load a file where this is done - Some minor bug fixes |
| 03-15-2005, 11:26 PM | #5 |
Guest | hmm you may refer me as author idea. //test editing post |
| 03-18-2005, 11:24 PM | #6 |
heftig, since the source is in delphi , I've been wondering if I can add it with some mods to my optimizer, you would figure as 1 of the authors of the program, and I always release it Open source, I would do the thing anyways, but if I could just use yours It would save me some time, important time. The modiffications would be doing the stuff for war3map.j during the obfuscation of the file, for example. The script survives when it has line breaks inside the strings, really. |
| 03-19-2005, 02:20 AM | #7 |
I really love the idea of this being "merged" into vexorian's optimizer. It could be a one click process instead of...5? |
| 03-19-2005, 12:14 PM | #8 |
Nevermind, I thought you were reading each file format, but you just browse for the strings in the Memory Stream, works 100% allright but is not what I was looking for (I plan to do more stuff than just inlining), will have to continue with my version then, will take sometime but it doesn't matter, since people can just use this program before using my optimizer. Anyways congratulations for making the program execution so so fast, I newb at Delphi didn't know about streams, time to use them more it seems. Thanks for the finds about quotes, backlashes and the 1024 bytes limit. |
| 03-19-2005, 12:38 PM | #9 |
Repeatedly copying everything to a TStringStream just for searching through it is not the fastest way to do this, but it works. It's a 1023 bytes limit. 1024 crash Warcraft. |
| 03-19-2005, 04:25 PM | #10 |
If I use this program and then wc3 optimizer I get an error and then my computer crashes BSOD. As far as I can tell, with OR without compacting the map it will crash in wc3 optimizer. |
| 03-19-2005, 04:50 PM | #11 |
I think that would be an issue with WC3Optimizer (maybe it doesn't expect strings inlined or war3map.wts missing). |
| 03-19-2005, 06:47 PM | #12 |
Then I won't be using this program. Not that it's bad, but wc3 optimizer has become almost a daily habit tool. I'll just wait for wc3 optimizer to have its own then I'll use that. |
| 03-19-2005, 10:00 PM | #13 |
so can this be used with wc3 optimzer and phizer mike's new tool? |
| 03-22-2005, 12:26 PM | #14 |
Note to Lord Vexorian: I you also plan to inline strings in the WTG file, there's a 299 character limit for strings (so anything that is longer should stay externalized) Though, there's no real reason to internalize strings in the WTG. |
| 03-23-2005, 10:12 AM | #15 | |
Quote:
I haven't tested it. |
