wc3edit.net
https://forum.wc3edit.net/

[GUIDE] How To Enable Single Player
http://forum.wc3edit.net/deprotection-cheating-f64/how-to-enable-single-player-by-jj2197-t5725.html
Page 1 of 1

Author:  JJ2197 [ June 19th, 2008, 1:55 pm ]
Post subject:  [GUIDE] How To Enable Single Player

Well I am going to start out with the easy way...

First search (Ctrl + F) for "-save" you'll end up seeing something probably
like this:
call TriggerRegisterPlayerChatEvent(SaveTrigger,Player(0),"-save",true)

The part in red is the name of the Saving Trigger.
Now search for DisableTrigger(SaveTrigger) and delete them.
Next look for CustomDefeatBJ and delete all of them.
That's the easy way to do it...

This is the harder way to do it, should do this if easy way doesn't work.
First search for PLAYER_SLOT_STATE_PLAYING, there may be more than one.
Now it will most likly either be one that is looped or one for each player.
If there is one for each player most likly you'll see right under them functions
that add to a variable, like set X = X + 1. This variable is how it tells how many
people are in the game. What you want to do is search X (Make sure to check
Match whole words and Match case). Then click Find next till you see something
like X=<1,X=1,X<2 or something that makes it only work if it's one. Now just change
the number to 0. There may be more then one checker, so make sure to get them all.
As for the looped one, there will be more than one X = X + 1 the one that won't be it
will be the one that is with exitwhen X>11. Here is an example:

loop
if GetPlayerSlotState(Player(A))==PLAYER_SLOT_STATE_PLAYING then
set X = X + 1
endif
set A = A + 1
exitwhen A>11
endloop

A is what you want to ignore and X is what you want to look for.

Well that's pretty much it... if you have any questions just post...

(edit by Bartimaeus) I'm just going to add this to the tutorial, since I see no reason why not.

First of all, if there's a special message that displays, or a defeat message, when you play single player, keep it in mind. Next, open the .j file in the map. If it's not STVN, (shortest trigger/variable names), then you should probably just search for save, or single player, delete the defeats, or enable the disabletriggers.

If it IS STVN, then you search for that special message I mentioned earlier. If it's not there, look in the .wts file in the map, and search for that instead. Find out the number of string, and search for it in JassCraft. If it's a defeat, just delete the defeat, and you're done. If there's no defeat, but you see a destroy/disable trigger, then you should enable them, instead. Or, if there's another trigger being run as a result, then follow the name of the trigger that's being run, and just go from them.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/