Can't figure out how to enable singleplayer

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

applepi
Newcomer
Posts: 23
Joined: February 1st, 2007, 11:41 pm

Can't figure out how to enable singleplayer

Post by applepi »

I tried to enable singleplayer by following the guides here and searching for guides online, but I can't figure what to change since in this map the conditions aren't the same as described in the tutorials. I tried comparing the variable I'm suppose to be looking for from an older map of the same series, but made by different authors.

Here's the part I'm unsure about. According to JJ's guide, I'm looking for rq, but I can't find all of the rqs I should find according to JJ and what I am suppose to change is different in this map or so it seems.
Spoiler:
loop
exitwhen qq>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[qq]=null
set bj_queuedExecUseConds[qq]=false
set qq=qq+1
endloop
set bj_isSinglePlayer=false
set rq=0
set qq=0
loop
exitwhen qq>=bj_MAX_PLAYERS
if(GetPlayerController(Player(qq))==MAP_CONTROL_USER and GetPlayerSlotState(Player(qq))==PLAYER_SLOT_STATE_PLAYING)then
set rq=rq+1
endif
set qq=qq+1
endloop
set bj_isSinglePlayer=(rq==1)
I've tried changing rq+1 to rq+0, but that doesn't work. I'm also not sure what to do with rq==1.
Please let me know what you think needs to be done! Thanks!

Also, when I use syntax checker, there are 44 errors that are part of the original, unedited file.
When I add JJ's cp for 1.24e, i get a message that the game is not found when I try to host the map. I'm not really concerned about having JJ's cp in there as long as I can enable singleplayer save/load.
You do not have the required permissions to view the files attached to this post.
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: Can't figure out how to enable singleplayer

Post by Senethior459 »

loop
exitwhen qq>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[qq]=null
set bj_queuedExecUseConds[qq]=false
set qq=qq+1
endloop
set bj_isSinglePlayer=false
set rq=0
set qq=0
loop
exitwhen qq>=bj_MAX_PLAYERS
if(GetPlayerController(Player(qq))==MAP_CONTROL_USER and GetPlayerSlotState(Player(qq))==PLAYER_SLOT_STATE_PLAYING)then
set rq=rq+1
endif
set qq=qq+1
endloop
set bj_isSinglePlayer=(rq==1)

I'd rather explain how to do this than simply do it for you. If you notice, it's starting with qq=0, so it begins checking if player 0 is a human player, not a computer. If they match those two requirements, it adds one to rq (which also started at 0), then adds one to qq and jumps to the beginning of the loop, meaning that it's now checking if player 1 is a human. This continues until qq is larger than the total number of possible players, at which point it sets bj_isSinglePlayer to true or false. This is the important part.
If there's only one human player, and the rest are computers, when the loop ends, rq=1. As you might notice from the last line, if rq is equal to 1, it sets bj_isSinglePlayer to one. Since that's a boolean variable, 1=true, 0=false, as with most computing-related things. It's basically telling the game if rq is only equal to one, it's in singleplayer mode. There's a few ways you can disable this.
1. change the last line to set bj_isSinglePlayer=false, so it returns false even if rq=1
2. change set rq=rq+1 to rq=rq+2. Then bj_isSinglePlayer can't be equal to 1, and it will stay at the false it is set to

Number one is probably the best method.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
infernorock
Forum Fanatic
Posts: 324
Joined: August 31st, 2008, 10:24 am
Title: ☆Fate Testarossa★
Location: Malaysia

Re: Can't figure out how to enable singleplayer

Post by infernorock »

Sorry Seneth, but I don't really understand that "1. change the last line to set bj_isSinglePlayer=false, so it returns false even if rq=1".
Does that mean change "set bj_isSinglePlayer=(rq==1)" into " bj_isSinglePlayer=false" and leave other on default?
Spoiler for Wc3 I'm using and Garena ID:
The wc3 version I'm current using:1.21,1.24b,1.24e
Garena UID-->pkyer123(BANNED for some reason LOL)
-->pkyer(Active)
-->InfernoRock(Banned for inactive...WTF!?)
Small Sized Duck wrote:IF someone is talking about a map they wanted cheated 17 years ago. And you bump it, you're retarded.
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Can't figure out how to enable singleplayer

Post by Ken »

Yeah. (rq==1) is a boolean expression, and will be true of rq (the count of how many human players in the game) is equal to one. The first method is better, since it's gonna be false no matter what, and the second just ensures that it would never be 1.

For reals, you could just remove everything in that function except for "set bj_IsSinglePlayer=false", and it'd be perfect.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
applepi
Newcomer
Posts: 23
Joined: February 1st, 2007, 11:41 pm

Re: Can't figure out how to enable singleplayer

Post by applepi »

Thanks for that explanation! However, for this map there seems to be more layers of anti-cheat. I tried both methods of enabling single player, but either method does not allow me to save or load. The trigger seems to be disabled. I think I found the triggers that seem to be responsible for save and load, but I can't make any sense on what to do with them. I tried retracing where the triggers were acting from, but I didn't get very far. I'm still trying to figure this out.
Spoiler:
function w0 takes nothing returns nothing
set Jn=CreateTrigger()
call DisableTrigger(Jn)
call TriggerRegisterPlayerChatEvent(Jn,Player(0),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(1),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(2),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(3),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(4),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(5),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(6),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(7),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(8),"-load",false)
call TriggerRegisterPlayerChatEvent(Jn,Player(9),"-load",false)
call TriggerAddCondition(Jn,Condition(function d0))
call TriggerAddAction(Jn,function v0)
endfunction
Does this mean if Jn is disabled, the load command will not work? That's what I thought so I tried to find what enables or disables Jn. I searched for all Jn and found there were other variables that would enable Jn, else disable. So I changed all such occurrences from disable to enable. Turns out the same was for the save command with it being Hn so I did the same for Hn. That didn't work though, but I tried saving after I died while playing and the command was recognized, but a blank code was given so I'm not sure if that was due to my changes because I didn't try that before. Load command still wasn't recognized or responded to.
Last edited by applepi on August 5th, 2010, 6:17 pm, edited 3 times in total.
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Can't figure out how to enable singleplayer

Post by haxorico »

how the save system works? you write -save? if so what stops you from saving?
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
applepi
Newcomer
Posts: 23
Joined: February 1st, 2007, 11:41 pm

Re: Can't figure out how to enable singleplayer

Post by applepi »

Yes -save to save and -load to load. Both do not work in single player. In-game, there isn't a message or anything. In the .j I think it checks for how many players are ingame (x>1 or something) and then either enables or disables the trigger. I'm trying to trace the trigger Jn (which I think is for loading) for all places it can be disabled. I suspect the disable for save would work the same.

Also, I think I have single player enabled correctly although I'm not sure what enabling this actually does since the -save and -load commands don't work.
Spoiler:
loop
exitwhen qq>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[qq]=null
set bj_queuedExecUseConds[qq]=false
set qq=qq+1
endloop
set bj_isSinglePlayer=false
set rq=0
set qq=0
loop
exitwhen qq>=bj_MAX_PLAYERS
if(GetPlayerController(Player(qq))==MAP_CONTROL_USER and GetPlayerSlotState(Player(qq))==PLAYER_SLOT_STATE_PLAYING)then
set rq=rq+1
endif
set qq=qq+1
endloop
set bj_isSinglePlayer=false
I was testing what changed and as far as anti-cheats go, I think they are all still there. The single player cheat codes still don't work (message says cheating is not allowed after entering the code in place of cheat enabled).
What does B4 here do?
Spoiler:
function Es takes nothing returns boolean
return(B4>=3)
endfunction
I tried changing Disable to Enable here as well as for all other places of this kind for Jn.
Spoiler:
function Gs takes nothing returns nothing
if(this())then
return
else
call DoNothing()
endif
call DisplayTextToForce(GetPlayersAll(),"TRIGSTR_2505")
if(Es())then
call EnableTrigger(Jn)
else
call DisableTrigger(Jn)
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Can't figure out how to enable singleplayer

Post by haxorico »

Try this war3map.j
I cant test as I don't have the map. I didn't delete anything so you can see what I did. Intead of deleting I used "//" to make warcraft not read it. I also explained why.
Have fun and good luck.
You do not have the required permissions to view the files attached to this post.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
applepi
Newcomer
Posts: 23
Joined: February 1st, 2007, 11:41 pm

Re: Can't figure out how to enable singleplayer

Post by applepi »

Thanks! Good information there for me! Your changes are a lot better than mine. :lol: I tested the map and the -load and -save commands are recognized now, but they don't work properly. My valid load code is reported invalid and when I try to save I always get the same code (qqqqqq-qqqqqq). Also sorry for not mentioning the map, I've attached it. It's on epicwar too.

I think D0 is necessary for loading. Seems that function is for invalid and valid codes. I'll continue looking. I think there might be some lines for D0 function that need to be inactivated, but not the entire function. I tried reactivating D0 and tested map, but -load command wasn't recognized.
You do not have the required permissions to view the files attached to this post.