Simple mod

Started by Legitosity, December 15, 2014, 11:49:08 PM

Previous topic - Next topic
Good evening everyone!

I was trying to follow along your modding guides, to edit the spawn timer on my server.

But I'm still at a loss as of how to open the mission.lvl file!

some help would be appreciated :)

Thanks!

- Legit

December 16, 2014, 01:37:38 AM #1 Last Edit: December 16, 2014, 01:58:13 AM by Legitosity
update

I found where to make the change in the mission.lvl file using Hex Editor Neo!

I know I have to do this

-Removing Spawn Timer-
Change this:
SetSpawnDelay(10.0, 0.25)

To this:
SetSpawnDelay(1.0, 0.25)

according to Phobos guide.

In the hex editor I searched "SetSpawnDelay" and found the location.



I'm guessing I have to change the ". . . " after SetSpawnDelay but I don't know what to change it too..

I'm sure there is a better way to change this, it's probably as simple as opening up in a program I don't know and editing the file lol, but that's where all of your expertise comes in ;)

Thanks haha

- Legit

December 16, 2014, 03:05:45 AM #2 Last Edit: December 16, 2014, 03:09:04 AM by Led
Welcome to the site.   :cheers:


That way can work, but I think that is the hard way.



edit:  below is for SWBFI.  For SWBF2, there should be something similar.


For stock maps, use BattleBelks mission builder
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=319



Use sleepkillers mission builder for SWBF2
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=424

You simple edit a text file and compile (munge) a new mission.lvl file.



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

December 16, 2014, 06:36:01 AM #3 Last Edit: December 16, 2014, 06:42:25 AM by Anyder
I don't really recommend u modding with that.
Download the bf2 modding tools, which u can find in the swbf2 mod factory board (i think i've set sticky the topic which has there the link) and then try modding mission.lvl with that.

It's much easier imo. However I can also help u hexediting that file :)
Btw, did u try to mod it because u saw it sonewhere ?
Edit: After a friend showed me, i found out that u could hexedit the bf.exe for modding, but i never tried hexediting that
Anyder | Talent, Ops & Culture | SWBF & Player Engagement
Email: communityambassador@swbfgamers.com
SWBFSpy Discord: http://discord.swbfspy.com
SWBFSpy Info: http://info.swbfspy.com

If you know how to change a number into a.. looks like a "short" or "ushort" data type, you could rewrite that data in hex editor, and I think that would do it.

My guess is that its a ushort, since the spawn time can't be negative.

I think a lot of the LVL data is stored simply in binary, and only needs a bit of data conversion to be read.
XVI32 has a data inspector that works miracles..

December 16, 2014, 08:30:21 AM #5 Last Edit: December 16, 2014, 08:56:14 AM by Legitosity
Quote from: Led on December 16, 2014, 03:05:45 AM

Use sleepkillers mission builder for SWBF2
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=424

You simple edit a text file and compile (munge) a new mission.lvl file

Hi! Thanks :)

Alright I downloaded the Terrain Munger, -but excuse my modding noobiness- I have no idea how it works.

It makes sense now that the mission.lvl file is a terrain file but which text file do I edit?

Do I make a new one, add "SetSpawnDelay(1.0, 0.25)" then munge it with the mission.lvl in the same folder?

EDIT: I think your download is linking to the wrong one, I happened to find the original forum post when looking around the site and Sleepy posted a different link than the one you have.


Quote from: Anyder on December 16, 2014, 06:36:01 AM
I don't really recommend u modding with that.
Download the bf2 modding tools, which u can find in the swbf2 mod factory board (i think i've set sticky the topic which has there the link) and then try modding mission.lvl with that.

It's much easier imo. However I can also help u hexediting that file :)
Btw, did u try to mod it because u saw it sonewhere ?
Edit: After a friend showed me, i found out that u could hexedit the bf.exe for modding, but i never tried hexediting that

Also hello :)

Yeah, modding with that seems crazy lol

I did download the mod tools last night, and read through the mission documentation. But that just told me what every line meant, not how to change it. When you say "just edit with that" are you referring to the "BF2_modtools" application in the root of the folder? Because that wasn't working for me. I tried running it and there was a system error. "The program can't start because binkw32.dll is missing from your computer. Try reinstalling the program to fix this problem" I didn't try reinstalling because it was 5am last night but maybe I should. I also did get the mod tools off of filefront so maybe that file is corrupted and I should download your link.

& I did see that somewhere else, before I found your forum I found this dude

https://www.gametracker.com/games/swbf2/forum.php?thread=86800

He says at the top of the post all I needed was a "simple hex editor" lol that is not simple! He goes through how to edit the mission.lvl file in point seven. I was able to follow his example, and delete the Gamorrean just by typing gibberish over what was there.



So that was easy, but I couldn't figure out how to change the Spawn timer :(

Quote from: ChristmasCommando on December 16, 2014, 08:15:18 AM
If you know how to change a number into a.. looks like a "short" or "ushort" data type, you could rewrite that data in hex editor, and I think that would do it.

My guess is that its a ushort, since the spawn time can't be negative.

I think a lot of the LVL data is stored simply in binary, and only needs a bit of data conversion to be read.
XVI32 has a data inspector that works miracles..

I don't know how to change a number into a "." but that makes sense I think, the developers shortened it down to save space? The hex editor I have lets me look at it as binary, but all of the "." just becom "00000000" and that tells me nothing. I'll look into XVI32!

Thanks for replying so fast haha

- Legit

here are the swbf2 dedicated server files for ps2/pc fast spawn updated for gamemaster use. rename the one you want to use to battlefrontII.exe :from the download folder:. rename the original one in your server folders to something different eg: orgbattlefrontII to keep a backup copy if needed. https://mega.co.nz/#!bFJHBTyK!mx933veUSr_Y-Fj_Kyy_kt7u_OkFhreCfimmxDDNTdk

December 16, 2014, 10:04:57 AM #7 Last Edit: December 16, 2014, 03:06:27 PM by Legitosity
Quote from: oldsnake on December 16, 2014, 09:57:11 AM
here are the swbf2 dedicated server files for ps2/pc fast spawn updated for gamemaster use.

Thank you! I really appreciate it, but we're currently using "Fasty's" mod? (I believe that's the name - at least the developer)

We're running a Team Death Match server, so kills only. What Fasty did was delete the flags on the cft maps so we wouldn't have to worry about telling players to not go for the flag, just kill people. He also opened up the back doors on the Death Star map so you didn't have to run all the way around and you could fight in the two back hangers.

I'm modding his mod to the mission.lvl file to change the spawn timer as well.

Although, if I'm still learning so if I don't know what I'm talking about -- forgive me haha

EDIT: I just re-read your post, and I think I'm stupid. With that file we don't have to replace anything in the mission.lvl file? All I have to do is replace our server .exe with yours and it'll work for everyone who joins the server?  Even if this does work (thank you) I'd still like to learn how to mod it on my own, for future products :)

EDIT EDIT: We couldn't get Snakes .exe file to go into our server for some reason.. So back to the first option! I followed your guide Anyder, and was able to open up the lua with Notepad++ and edit the file. But when I munged from within the folder it didn't export the new mission.lvl to _LVL_PC in my gamedata. Whats confusing is when I run the game and host a server, I see the map "%LEL%" in my options but I can't find it in the game data...

ah thats bad it works on the 4 pc/nfo i have. the directions are here if needed https://gameshare.co/forum/viewtopic.php?f=26&t=76 all you have to do is extract the file rename the file you want to use to BattlefrontII copy the rename file then paste it into the server folder. it will control the whole server for fast spawn.

Quote from: oldsnake on December 16, 2014, 08:36:31 PM
ah thats bad it works on the 4 pc/nfo i have. the directions are here if needed https://gameshare.co/forum/viewtopic.php?f=26&t=76 all you have to do is extract the file rename the file you want to use to BattlefrontII copy the rename file then paste it into the server folder. it will control the whole server for fast spawn.

You linked me to the GameMaster patch, we have that, our servers are online.

The .exe file you had me download gets rid of the 15 second spawn time when you die?

For whatever reason, we couldn't upload or change any of the .exe files in the control panel on the server so for right now we can't use your fix. We can however edit the mission.lvl file so I'm still working on that.



Right now I'm stuck on Anyder's method, I think I'm just repeating what I said above but

I created a new world called "TES" and copied over the right files from /BF2_ModTools/Asset into /data_TES/Common

I edited inside /Common/Scipts/TES

all of the files, I opened them up in NotePad++ and found

"SetSpawnDelay(10.0, 0.25)"

and changed it to

"SetSpawnDelay(1.0, 0.25)"

Then I went to the "_BUILD" folder and ran the Munge tool. It told me it created all of the files within my /GameData folder but I can't find it.

The weird part is that when I go in-game I can see the map "%TES%" in the map selection screen.

I can't find the new mission.lvl file to replace :(

the new mission.lvl should be in the bf2_modtools/data_*yourmod id*/ _lvl_pcfolder. the file you download is the same as the gamemaster file just edited for fast spawn and it is only 1-2 second wait time to respawn.

Quote from: oldsnake on December 17, 2014, 01:18:12 AM
the new mission.lvl should be in the bf2_modtools/data_*yourmod id*/ _lvl_pcfolder. the file you download is the same as the gamemaster file just edited for fast spawn and it is only 1-2 second wait time to respawn.

There isn't a "_LVL_PC" folder in there.

& how did you edit it?

- We still can't get .exe's to upload to our server :\

December 17, 2014, 11:59:55 AM #12 Last Edit: December 17, 2014, 12:18:56 PM by Legitosity
*UPDATE*

I honestly thought that I had it figured out, using Sleepy's mission.lvl_PC_swbfii files.

I changed what I wanted in the .lua files from within the /scripts/ folder

I took out the flag and changed the spawn timer

but when I went back to the root of the folder and ran the munger

I got this -- this is what happened when I ran it regularly



This is what happened when I ran as an admin.



EDIT**** I moved his folder to my C drive and it's working! I think I'm getting close :)

Hey there, now i have some more free time to mod stuff, so PM me whenever u can and i'll try to help u
Anyder | Talent, Ops & Culture | SWBF & Player Engagement
Email: communityambassador@swbfgamers.com
SWBFSpy Discord: http://discord.swbfspy.com
SWBFSpy Info: http://info.swbfspy.com

fast spawn hex edit. download the server file BattlefrontII.exe from gamemaster. extract the file. using xvi32 open the battlefront exe.
click the search and enter pAS into the search box click okay. there are 2 boxes to change 70 41. make 70 become 00. make 41 become 3F. when done click file save. your exe is now ready for placement in your server folder.