• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Script] Reviving Old Map - Just Need Script Edit To Add More Players

Level 2
Joined
Jun 2, 2022
Messages
16
Hello great community! Attached is an edit (2.0) of an old map called "Servant War", where I added more players, terrain and brought back the old script.
Credit to Ogre-Lord for the original map & Bond009 (From Custom Hero Footies) for helping me thus far!

I will post the newest old version (1.05) so you can see how the game normally plays out. With 2.0, the script can be edited.

In the original map, you can only have 8 players (up to color pink) and for some reason (not sure why) there is grey (which is set to a computer); not sure if the computer has to do with the script, but no passive/computer units are in the map. Also in the original map, all 8 of the players can be turned into computers in the lobby, which they all play the game [their names get automatically turned into "Bot (number)"].
For this new map, I want to have up to the max amount of players if possible (excluding 1 if a computer is needed for script). I also want the bots to play just like in the old map (if this can't be done, that is fine, but it would be awesome).

There are 2 particular problems with this new map.
1. The terrain changes I made are being restricted to a small playable area, not sure why. Attached is an image of the play map. (Weirdly enough I did enter one game test and that did not occur, but when I entered again, it did occur) Both Bond and I don't know why this is the case.
2. Any of the colors past pink do not even spawn on the map (whether as a player or computer, they seem to be observer-like), it seems like the script is completely ignoring these colors. So if we can just add them to the script, that would be great! Not sure if the "forces" have to do with anything, it may also need to be modified if the computer grey is supposed to be in their own force for the script.

Any and all help will much be appreciated! When this project is complete, I will make a YouTube video for it on my channel "KOOKOONUT TV" giving whoever credit!
 

Attachments

  • ServantWar_2.0_a.w3x
    288.7 KB · Views: 14
  • ServantWar1.05(protected).w3x
    652.4 KB · Views: 8
  • weirdmapboundaries.png
    weirdmapboundaries.png
    92.6 KB · Views: 29
  • originalamoutnofplayers.png
    originalamoutnofplayers.png
    1.1 MB · Views: 30
Level 2
Joined
Jun 2, 2022
Messages
16
I also want to say that this map (the old servant war) used to be hosted ALL the time, and I STILL get FULL games of players nowadays when I host! It will be super sick to revive this game even more by adding more players and terrain!
 
Level 2
Joined
Jun 2, 2022
Messages
16
I'm on this everyday trying to check for replies, hope to make this happen! It sounds simple, but I don't know!
 
Level 2
Joined
Jun 2, 2022
Messages
16
Curious, I have yet to touch the codes, but what patch you guys are handling the edit?
The 2.0 we created based on 1.05, we just brought over the script and tried adding more players and terrain. But we need to allow the terrain to be playable and the script to include all the players. We are looking for someone to take this 2.0 version and make it work as such, because we created it with the intention that it can be the new map.
 
Level 2
Joined
Jun 2, 2022
Messages
16
Curious, I have yet to touch the codes, but what patch you guys are handling the edit?
Thanks for your interest! I really hope we can get this going because I love this game and I think it would be super epic to get this working! I'll host it all the time.
 
The 2.0 we created based on 1.05, we just brought over the script and tried adding more players and terrain. But we need to allow the terrain to be playable and the script to include all the players. We are looking for someone to take this 2.0 version and make it work as such, because we created it with the intention that it can be the new map.
I am referring to game patch, like are you using 1.26, 1.27, 1.28, 1.29, 1.31, or Reforged?
 
Level 2
Joined
Jun 2, 2022
Messages
16
What happened was: I would edit the map in reforged world editor (just to add terrain for Servant War 2.0) then I'd send him the map, but he wouldn't be able to open it to put in the script (which he retrieved from Servant War 1.05), it would crash. So he gave me 1.29 to download (which then I had to do a registry edit to delete the "worldedit" folder in order to open the editor) then use that world editor (to add terrain again) and send him the map, and he put in the script; and that is where we are now with the issue of players and strangely-restricted terrain.
 
There is a lot of internal code referring to 8 directly. This halts any additional slot from being responded. Hard to say what each does with how the script is written.

Also, this looks like parsed from the old map directly using xdep, at least from what I recall from similar code writings. Have you tried to reach the original author? This one is hard to work with without breaking things in the process.
 
Last edited:
Level 2
Joined
Jun 2, 2022
Messages
16
There is a lot of internal code referring to 8 directly. This halts any additional slot from being responded. Hard to say what each does with how the script is written.

Also, this looks like parsed from the old map directly using xdep. Have you tried to reach the original author? This one is hard to work with without breaking things in the process.
I did try to reach out to Ogre-Lord but doesn't seem like he's around anymore :( So are you saying we can't add more players than 8?

What if we were to make a script like this from scratch? Would it be hard? It sounds like a simple concept, you kill someone and they become your ally (and color) until one person rules the whole map with one color.
 
I did try to reach out to Ogre-Lord but doesn't seem like he's around anymore :( So are you saying we can't add more players than 8?

What if we were to make a script like this from scratch? Would it be hard? It sounds like a simple concept, you kill someone and they become your ally (and color) until one person rules the whole map with one color.
If possible, I'd rather recode everything from scratch, but this can be a tantamount task if not insane (at least by looking at the code size, but hey, that's me and I'm lazy). At the current state, it is possible to tamper with the number, but you need to know what you are doing and make sure every 8 are accounted for. You might want to use something like JassCraft, Visual Studio Code, or at least Notepad++ (not for the faint of heart) for easier code viewing and to assure everything is accounted for. There are also some variables where 8 is involved, but I am not sure what is the code aimed for with these variables.

As for the camera issue you mentioned, I noticed you already commented on the CameraBounds code, so I cannot find anything that caused the issue regarding the clipped map you encountered. However, given the nature of the code, I think this is rather than setting it to the numbers from the camera setting instead. Not sure if that will work, kinda hard to tell. I am quite sure it is probably the case due to how the code is structured, as weird as it is.
JASS:
// call SetCameraBounds(- 2560.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 9728.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 4096.0 - GetCameraMargin(CAMERA_MARGIN_TOP), - 2560.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 4096.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 9728.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
This bound can be set using this information. Not the nicest, but should solve it if you got the bound positions right.

Given that the original map is protected, I don't want to involve myself too much.

EDIT:

Player(9) is used to ensure the game has at least 2 teams. The purpose is to ensure the map can be played in multiplayer.

EDIT 2:

Might also not be as simple as replacing as 8, since there are spawn codes and all which I don't know where they are, so I'd say try tampering the 8 then see what happens and follow up from there.
 
aw man, thanks! I reached out to Bond, but not sure if we can do this then :eek: Sounds a bit tricky
Well, once everything starts to get clearer, it might be a good idea to rename code names based on what can be deduced from it as well. That way, you have some form of way to get a good idea of what the map is doing.
 
Level 2
Joined
Jun 2, 2022
Messages
16
Bond was first looking at this:
call SetCameraBounds(- 2560.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 9728.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 4096.0 - GetCameraMargin(CAMERA_MARGIN_TOP), - 2560.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 4096.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 9728.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
old
call SetCameraBounds(- 2176.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), - 8064.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 9344.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3456.0 - GetCameraMargin(CAMERA_MARGIN_TOP), - 2176.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3456.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 9344.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), - 8064.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
-
He tried something but it didn't work. He then said the following:
well found its something in the top 3 functions causing it and 1 in the bottom 3 cause the lock too
call ExecuteFunc("HN")
call ExecuteFunc("rV")
call ExecuteFunc("nV")
call ExecuteFunc("JV")
call ExecuteFunc("lV")
call ExecuteFunc("iX")
so at least that narrows it down
maybe let them know on the hive and see if they will have time to dig into what is causing the locked regions
if someone has the time to look im sure it will be a semi ez fix
but at least i found whats causing it now
-
its this one
call ExecuteFunc("HN")
so some code in that function is locking the map size limits that units can move around to
let them know that and someone can find it ez im sure
i wont have time for a while though to do it
but if no one helps on the hive i can look at it next week maybe
the bummer is that functions calls all this
function HN takes nothing returns nothing
set Ia=CreateTrigger()
call TriggerAddCondition(Ia,Condition(function jN))
set Aa=CreateTrigger()
call TriggerAddCondition(Aa,Condition(function JN))
set Na=CreateTrigger()
call TriggerAddCondition(Na,Condition(function kN))
set ba=CreateTrigger()
call TriggerAddCondition(ba,Condition(function KN))
set Ba=CreateTrigger()
call TriggerAddCondition(Ba,Condition(function lN))
set ca=CreateTrigger()
call TriggerAddCondition(ca,Condition(function LN))
set Ra=CreateTrigger()
call TriggerAddCondition(Ra,Condition(function mN))
set ra=CreateTrigger()
call TriggerAddCondition(ra,Condition(function MN))
set ia=CreateTrigger()
call TriggerAddCondition(ia,Condition(function pN))
set aa=CreateTrigger()
call TriggerAddCondition(aa,Condition(function PN))
set na=CreateTrigger()
call TriggerAddCondition(na,Condition(function qN))
set Va=CreateTrigger()
call TriggerAddCondition(Va,Condition(function QN))
set Ea=CreateTrigger()
call TriggerAddCondition(Ea,Condition(function sN))
set Xa=CreateTrigger()
call TriggerAddCondition(Xa,Condition(function SN))
set Oa=CreateTrigger()
call TriggerAddCondition(Oa,Condition(function tN))
set Zi=CreateTrigger()
call TriggerAddCondition(Zi,Condition(function TN))
set va=CreateTrigger()
call TriggerAddCondition(va,Condition(function uN))
set ea=CreateTrigger()
call TriggerAddCondition(ea,Condition(function UN))
set xa=CreateTrigger()
call TriggerAddCondition(xa,Condition(function wN))
set oa=CreateTrigger()
call TriggerAddCondition(oa,Condition(function WN))
set zi=CreateTrigger()
call TriggerAddCondition(zi,Condition(function yN))
set Ca[1]=CreateTrigger()
call TriggerAddAction(Ca[1],function YN)
call TriggerAddCondition(Ca[1],Condition(function YN)
endfunction
so someone will have to trace each one of those to find where the issue is in the code
set Xa=CreateTrigger()
call TriggerAddCondition(Xa,Condition(function SN)) (edited)
its this 1 above (edited)
that will help speed them up
and give better odds of someone helping
 
Level 2
Joined
Jun 2, 2022
Messages
16
Well, once everything starts to get clearer, it might be a good idea to rename code names based on what can be deduced from it as well. That way, you have some form of way to get a good idea of what the map is doing.
hope the above helps ^
 
Top