SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF2 Modding => Topic started by: Legitosity on December 15, 2014, 11:49:08 PM

Title: Simple mod
Post by: Legitosity on December 15, 2014, 11:49:08 PM
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
Title: Re: Simple mod
Post by: Legitosity on December 16, 2014, 01:37:38 AM
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.

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fy8qUtvf.png&hash=d0e369241f47640936eb6ee7f52664c8ec52d310)

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
Title: Re: Simple mod
Post by: Led on December 16, 2014, 03:05:45 AM
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.



Title: Re: Simple mod
Post by: 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
Title: Re: Simple mod
Post by: RepComm 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..
Title: Re: Simple mod
Post by: Legitosity on December 16, 2014, 08:30:21 AM
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.

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FBMPH9y8.png&hash=16482f259f204295a7dc2a06b7071cadc7c580e3)

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
Title: Re: Simple mod
Post by: 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. 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
Title: Re: Simple mod
Post by: Legitosity on December 16, 2014, 10:04:57 AM
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...
Title: Re: Simple mod
Post by: 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.
Title: Re: Simple mod
Post by: Legitosity on December 16, 2014, 11:14:15 PM
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 :(
Title: Re: Simple mod
Post by: 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.
Title: Re: Simple mod
Post by: Legitosity on December 17, 2014, 10:44:33 AM
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 :\
Title: Re: Simple mod
Post by: Legitosity on December 17, 2014, 11:59:55 AM
*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

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FMSwGvOi.png&hash=ee3f55eb6a54beecc5e1048da28450363df1ffb8)

This is what happened when I ran as an admin.

(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FS5bJTFo.png&hash=bfb47e5ec3d94cbdf03e5c20bc2202ad96368712)

EDIT**** I moved his folder to my C drive and it's working! I think I'm getting close :)
Title: Re: Simple mod
Post by: Anyder on December 17, 2014, 12:31:19 PM
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
Title: Re: Simple mod
Post by: oldsnake on December 17, 2014, 01:30:53 PM
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.
Title: Re: Simple mod
Post by: Legitosity on December 17, 2014, 01:39:49 PM
I messaged you Anyder

& I opened up the GameMaster patch with xvi32 but when I searched for pAS it told me the string wasn't found.

*EDIT*

I got the help I needed from Anthony_B on GamerToast

If you were interested.....

here was his response

1) The spawn timer is hard coded in the exe, you need the VA patched exe for instant spawn.
editing that little code on the map scripts does nothing.

2) removing tanks can be done without making mods, open any tank map file in hex editor and use the find+replace function and do this
com_item_vehicle_spawn becomes com-item-vehicle-spawn, do this for each instance of com_item_vehicle_spawn - this makes the game look for com-item-vehicle-spawn which doesn't exist, making tanks not work.

3) You can also remove flags using hex edit on the existing files
open the map file in hex editor, and search for com_item_flag, and between what looks like "XFRM0" and "PROP" there is about 50 bytes of data - obscure this data by writing just random letters and numbers over it (don't overwrite xfrm0 and prop, just the data in between those bits)
those little bytes of data is object coordinate and changing it puts the flag somewhere only god knows.

For 2 flag levels, do this for each instance of the flag you find. Usually f3 in hex tools finds next instance.
Title: Re: Simple mod
Post by: Phobos on December 18, 2014, 02:19:25 AM
Quote from: Legitosity on December 17, 2014, 11:59:55 AM
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FMSwGvOi.png&hash=ee3f55eb6a54beecc5e1048da28450363df1ffb8)
EDIT**** I moved his folder to my C drive and it's working! I think I'm getting close :)
Looks like the space was breaking the munger. This applies to BF1 sound munging too, good thing you were able to get it working.
EhPortal 1.34 © 2024, WebDev