Looking for Fast Spawn modding info

Started by PyroJockey, January 25, 2012, 08:04:32 PM

Previous topic - Next topic
Greetings,

I am a modder of the PS2 version of the dedicated server. I am seeking information on how the fast spawn mod is done in hopes of applying it to the PS2 version vis HEX editing. This would have to be a "no download" type of mod.

Can anyone provide information on this mod?  :blink:

Thanks.
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

Quote from: PyroJockey on January 25, 2012, 08:04:32 PM
Greetings,

I am a modder of the PS2 version of the dedicated server. I am seeking information on how the fast spawn mod is done in hopes of applying it to the PS2 version vis HEX editing. This would have to be a "no download" type of mod.

Can anyone provide information on this mod?  :blink:

Thanks.
I think that requires editing the LUA files and munging a mission.lvl I don't know if it's possible to alter spawn time through hex editing.

I think it could be done by hex edits, but it doesn't need to be.  It is a server side mod.  I will edit this post later today to show you how via mssion.lvl re-munge.





Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Quote from: Buckler on January 26, 2012, 01:16:26 AM
I think it could be done by hex edits, but it doesn't need to be.  It is a server side mod.  I will edit this post later today to show you how via mssion.lvl re-munge.

Sounds promising. I have not had much luck with the SWBF2 PC MOD tools. I was never able to get the Zero Editor running on Vista x32 and I doubt I will have much luck on Win 7 x64 (will not run any 16 bit code). I did get it to start without error on one of my XP x32 machines, but it was not usable. I have since rebuilt that XP machine and lost that install, but I'm willing to give it another go.
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

ZeroEditor is not needed to make mission.lvl changes all you need is battlebelk toolbox and notepad.

First, I need to keep in mind that you are doing SWBF2 and not SWBF.


in the SWBF2 map LUA files you will find this:

-- This sets the overall unit spawn delay for this level.   
    SetSpawnDelayTeam(2.0, 0.5, ATT)
    SetSpawnDelayTeam(10.0, 0.5, DEF)
    SetSpawnDelayTeam(10.0, 0.5, AMB)
    SetSpawnDelayTeam(10.0, 0.5, GAR)
    SetSpawnDelay(1.0, 0.25)

change the 10 to a lower value.

Then you need to re-munge the mission.lvl file.


We have a mission munger by BattleBelk for SWBF, but I don't know of one for SWBF2.  The Gametoast folks may be able to help--we are mostly all about the original game here, but some in the group do both.

There have also been various fixes to make the SWBF mod tools work with 64 bit OS.  I suspect some of these things may apply to SWBF2 mod tools also.  Search through our modding section to find a few things to try.

Lastly, I could try to create several single map mission files with various spawn times so you could see the hex differences in the files and infer what changes when it gets re-munged.  Then you might be able to hex edit it.  (I don't know if there are any munging differences between SWBF2 PC and PS2 though.)


good luck







Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 26, 2012, 07:02:50 PM #6 Last Edit: January 26, 2012, 07:06:43 PM by PyroJockey
I have located instances of "SetSpawnDelay" for all the missions in the mission file. I only located a few instances of "SetSpawnDelayTeam" and always singular. I attempted manipulating some of the HEX values following them, all with bad results.

At this point it is unknown if a remunged mission file will work with the PS2 version. Would you be willing to provide me with a mission file for evaluation? I would like to examine the HEX values and test it as a proof of concept before going full bore with the editing tools.

Thanks,
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

sure, let me try this weekend.

Note that the arguments for the LUA commands are stored at the end of the each maps portion of the mission.lvl file--in other words, it is not anywhere near the text for "spawn delay" if you view it in its munged form using a hex editor.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Here I've modified Battlebelks SWBF1 mission.lvl builder into a SWBFII mission.lvl builder this will let you munge a new Mission.lvl for SWBFII letting you change the Spawn delay (And some other values like max fly height etc etc etc.) http://www.mediafire.com/?9dirnmi4kugnml7
Enjoy!

If you want I could probably make you some SWBFII PS2 side builders so you wouldn't have to Hex edit any more, you could change the ODFS directly.


January 28, 2012, 10:22:12 AM #9 Last Edit: January 28, 2012, 12:01:27 PM by PyroJockey
Thanks,

I need to figure our how to use it.

Edit, first note, no spaces in path....

Edit, I think I got it figured out, but no luck. I was focusing on the Endor conquest map "end1g_con.lua". I found no instances of "SetSpawnDelayTeam". I did find one instance of "SetSpawnDelay(10.0, 0.25)".

I munged the scripts, then edited the instance of  "SetSpawnDelay(10.0, 0.25)" to "SetSpawnDelay(01.0, 0.25)" and re-munged it. I compared the results of both munges and found 2 bytes that changed. I found the matching byte strings in the game mission.lvl file and changed them accordingly. There were 88 occurrences of the string and there are 85 multiplayer missions. Rather than playing hit-or-miss I changed them all. I still have a 15 second spawn timer.

Any suggestions as to where I can find or set "SetSpawnDelayTeam"?

Great tool by the way, I plan to test it to the max. Thanks.
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

Quote from: PyroJockey on January 28, 2012, 10:22:12 AM

Great tool by the way, I plan to test it to the max. Thanks.


Nice Pyro!  I am looking forward to see what you have in store for the future.

I'm looking up a lot of stuff, doing a lot of trial and error, but so far have no results. I suspect the PS2 version of the game draws a lot of the values, like the spawn timer, from the local disk, not the server.

I am continuing to experiment with the Battlebelks program, seeking out some of the other elusive values. One of the items I've been pursuing is to add additional ATTEs to Geonosis conquest.

I found these values in the Geonosis conquest script

AddWalkerType(3, 0)
SetMemoryPoolSize("CommandWalker", 1)

and altered them to what I think are appropriate for a second ATTE (matches the values in the Hoth conquest script for ATATs)

AddWalkerType(3, 2)
SetMemoryPoolSize("CommandWalker", 2)

I identified the 4 bytes that change, 2 bytes for each setting, and feel certain I located them in the mission file. When I HEX edit them however the game will crash on loading.  :(
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

Hi Pyro,


Be sure to use Sleepkiller's tool for SWBF2 (Battlebelks is for SWBF).

The integer representation for PS2 and PC may be different, I don't know about that but Tirpider might be able to help there.

I don't believe that you can increase the number of ATTE on a map with that value--I think each one still needs a spawn point in the map lvl file.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 30, 2012, 11:48:36 AM #13 Last Edit: January 30, 2012, 11:55:00 AM by PyroJockey
Quote from: Buckler on January 30, 2012, 10:50:07 AM
Be sure to use Sleepkiller's tool for SWBF2 (Battlebelks is for SWBF).

Sleepkiller already took care of me in that regard:

Quote from: SleepKiller on January 27, 2012, 02:42:21 PM
Here I've modified Battlebelks SWBF1 mission.lvl builder into a SWBFII mission.lvl builder this will let you munge a new Mission.lvl for SWBFII letting you change the Spawn delay (And some other values like max fly height etc etc etc.) http://www.mediafire.com/?9dirnmi4kugnml7

Been there, done that. Thanks Sleepkiller

Quote from: Buckler on January 30, 2012, 10:50:07 AM
I don't believe that you can increase the number of ATTE on a map with that value--I think each one still needs a spawn point in the map lvl file.

I'm experienced with HEX editing the vehicle spawns and I've already addressed the vehicle spawns in the Geonosis map file. Currently in Geonosis conquest the ATTE will spawn at any of 4 vehicle spawns and will belong to the side that controls the CP associated with the vehicle spawn. The ATTE will only spawn if the associated CP is not neutral. It will no longer spawn for the Republic unconditionally. I want to increase the number of ATTEs so they can duel. I have increased the maximum number of concurrent vehicles per each vehicle spawn. This works well for most vehicles on  most maps, but the maximum number of ATTE per mission is restricted in the mission file.

An example of this is evident on Polis Masa. When playing GCW era CTF I can spawn up to 5 Alliance ACCs from the 3 vehicle spawns but for CW era CTF only one ATT from any of the same 3 vehicle spawns with the same properties.

I have done something similar to what I want in Hoth conquest. An imperial ATAT will spawn in the Eastern snowfield as usual, but a Alliance ATAT will spawn in the western edge of the Alliance hangar opening. These ATATs are not associated with any CP's and will always spawn, one for the Imperials, one for the Alliance.

On Hoth I also modded the vehicle spawns in the hangar to all spawn ATSTs when the CP is controlled by the Imperials.

I love vehicular homicide.  :D

Quote from: Buckler on January 30, 2012, 10:50:07 AM
The integer representation for PS2 and PC may be different, I don't know about that but Tirpider might be able to help there.

I do not believe the lvl files are platform specific and that the HEX values valid for both the PC and PS2 versions. The containing folder is even named "_LVL_PC" for both versions of the dedicated server. I will test this theory tonight. I'll put up a dedicated server for the PC version and use all the lvl files from my PS2 dedicated server including all the mods. It should be interesting.

Thanks for all the feedback. I can be pretty persistent with some of these mods. It took me 6 months before I figured out how to spawn a holicron as a second flag in the center of Kamino CW 1 flag CTF.
There are times you strive for greatness, to reach lofty goals and accomplish
noble deeds. Then there's the rest of the times you just want to blow s--- up.



Blowing s--- up since 1978

My initial poking around in the PS2 BF1 mission.lvl showed the encodings of floating points and integers to be the same as the PC version.

I don't have the PS2 BF2 server or the PC BF2 game handy. So it's all relative.

It would be interesting if BF2 ps2 lvl's worked on PC.  BF1 lvls don't at all.

There might be some ps2 platform specific lua commands. Some the rendering is handled a little different, it's possible some of the game mechanics are a little tweaked as well.

I think there is a SetPS2ModelMemory() function somewhere. (I don't even know if that's spelled right or applicable.)