SWBFGamers

Modding for the Original SWBF1 and SWBF2 => Requests => Topic started by: Kit Fisto on July 13, 2012, 01:18:42 PM

Title: Mission.lvl changes request
Post by: Kit Fisto on July 13, 2012, 01:18:42 PM
.
Title: Re: Tutorial request
Post by: tirpider on July 13, 2012, 04:40:25 PM
Patience, Padawan.
Not everyone is ready to whip up a tutorial at a moments notice.

I wish I could help, but I have no knowledge of hexing the mysteries of the mission.lvl.

-edit
Fancy meeting you here, Buckler :P
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 04:44:24 PM
Oh sorry buckler. I thought it automatically edited it for me.
All I want to know is to make the rebels have forest gear, do I put "all_inf_basicforest" then "all_inf_soldierforest"
Title: Re: Tutorial request
Post by: Led on July 13, 2012, 04:47:07 PM
The new unit replaces the unit in AddUnitClass loadouts:

SetTeamName (3, "locals")
    AddUnitClass (3, "ewk_inf_trooper", 4);
    AddUnitClass (3, "ewk_inf_repair", 6);
    SetUnitCount (3, 14)
    SetTeamAsFriend(3,ATT)
    SetTeamAsEnemy(3,DEF)


you must call the side lvl file with the new unit first

I don't know the names of the forest units off the top of my head.  You will have to look in the mod tools or make new units with those names.
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 04:49:48 PM
I don't really get it. I'm trying to hex edit the mission.lvl on sk's dagobah conversion to make the rebels have forest gear...
Title: Re: Tutorial request
Post by: Led on July 13, 2012, 04:54:25 PM
OK, I did not know you figured out how to hex edit.  You need to change the name of the unit, but it has to be a name that actually exists.

Use your hex editor to look in the mission.lvl file in the section for Endor and see what unit is used there.  Then, replace the name for the lua you want to edit.  Note:  the length of the old and new unit names must be exactly the same.

And, this soooo much easier with a PC...and I know you don't want to hear that again, but it's true :)
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 04:56:24 PM
I changed others from desert to urban by just deleting desert and putting urban. Does that work? or did I do something wrong...
Title: Re: Tutorial request
Post by: Led on July 13, 2012, 05:02:09 PM
If it worked, that is great.  It would have been because u-r-b-a-n is 5 letters and d-e-s-e-r-t is 6 letters.  Since the new is 5 letters, and the old is 6 letters, maybe it works.

The other way would not have worked.

A general rule with hex editing (unless your a a hex wizard like tirpider who is decomposing the file structure) is that you need to maintain the exact number of bytes in a file, or line, or anything else.

f-o-r-e-s-t over desert may work or over urban, but I don't know if any units are called forest.
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 05:08:41 PM
So you are saying desert changed to urban might work.

Later today I'll try the maps with the mission.lvl's I changed from desert to urban. They are mostly conversions where I got annoyed with the rebel's outfits not matching thier envoronment.

Buckler/Led: You can delete my first 3 posts, I got a little carried away. :P
Title: Re: Tutorial request
Post by: tirpider on July 13, 2012, 05:09:41 PM
In cases where a longer string is to be replaced with a shorter string, it seems posible to replace the unused characters with null (00) values.

for example:

hex                 string
64 65 73 65 72 74   desert
75 72 62 61 6E 00   urban


Phobos turned me on to that tip :)
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 05:12:34 PM
I just compared the original jedi temple mission.lvl with the one where I changed the rebels to URBAN and the very bottom is different. So I just add 00 until its filled up?
Title: Re: Tutorial request
Post by: tirpider on July 13, 2012, 05:14:49 PM
Quote from: kitfisto15678 on July 13, 2012, 05:12:34 PM
I just compared the original jedi temple mission.lvl with the one where I changed the rebels to URBAN and the very bottom is different. So I just add 00 until its filled up?

Only if it looks like it is part of the string you are trying to replace.

If you cover up soemthing else with nulls, it might (read as "probably will") break the lvl
Title: Re: Tutorial request
Post by: Kit Fisto on July 13, 2012, 05:17:39 PM
Well. Now what.
I didn't know changing rebel clothes to match environments would be soo difficult! I can't really test it right now to see if it works...
Title: Re: Tutorial request
Post by: tirpider on July 13, 2012, 05:27:36 PM
I'm unsure what is next for you.
I would make sure the files are in the right place and test?

Like I said, I have never hexed a lvl directly, so like most hexeditors before you, you are kinda blazing a trail to call your own.
Title: Mission.lvl changes request
Post by: Kit Fisto on July 13, 2012, 05:35:33 PM
Well I just tried Jedi temple and it crashed. It didn't even make it to the loading screen. Here is what I was trying to do:
Give rebels urban outfit/clothes on:
1. Sk's coruscant Jedi temple
2. Scum strikes Mygeeto
3. Scum strikes Mustafar
4. Sk's Tantive IV

And give rebels forest gear on sk's dagobah.

Also lower clones reinforcements by 30 on his geonosis dust plains
All by hex editing.

I have people tell me to hex edit and when I try I fail. And according to tirp, no one has done it like I'm trying to do it. It seems that I'm not meant to mod. Or Even hex edit. So it seems that this is wha it has boiled down to:

Does someone want to do the above changes for me?
Title: Re: Mission.lvl changes request
Post by: Led on July 13, 2012, 05:48:43 PM
Hex editing can be tricky.

If you can munge on a PC, all you need to change is a line of text (using battlebelks mission builder is super easy).
Title: Re: Mission.lvl changes request
Post by: Kit Fisto on July 13, 2012, 05:50:32 PM
I don't have a PC and am not in the position to acquire one. :'(
Title: Re: Tutorial request
Post by: tirpider on July 13, 2012, 06:03:15 PM
Try and fail is the Tao of hexing.
If it doesn't work the first time, undo the previous changes, and plan a different route.
Make one change at a time to make it easy to undo if you have to.
Test more often than you think you need to.
Always work from backup copies.

As for changing the outfits, the outfits you want to change to need to exist in one of the sides loaded by the missionl lua.
I don't remember if SK used custom sides or not. Pretty sure he didn't, so the urban and jungle variants should be there.
You found the all_inf_soldierdesert part.
Don't give up.
It sounds like you are almost there.

At the worst, just start over from a clean copy.

-edit
To clarify, I think what you are calling outfits are actually odf files.
(there is no all_inf_soldierdesert tga or msh, but there is an odf with that name in the assets)
Those are called by the req files which have names like all_inf_basicdesert (basic instead of soldier)

Now that I think a little deeper on it, you changed the class name all_inf_soldierdesert to urban, but I bet that somewhere in that mission lvl there is a reference to all_inf_basicdesert that needs to be changed in the same way.

I got that by looking at how the sides are layed out and refferenced in the req files found in
BFBuilder\Assets\Sides\ALL\REQ

I may be dead wrong on that.
The only way to know is to try :)
Title: Re: Mission.lvl changes request
Post by: Kit Fisto on July 13, 2012, 06:10:16 PM
I think I'll lower my amount of mission.lvl requests.
These changes
1. Sk's Jedi temple: give rebels urban clothes
2. Sk's geonosis conversion: lower rep reinforcements to 220

@ Buckler/led: you did a mission.lvl for me once before, could you please do it for me again? You wouldn't have to do the others...  :shrug:
Title: Re: Mission.lvl changes request
Post by: Led on July 13, 2012, 07:49:32 PM
I can help, but this weekend is tough.  I can do it within 7 days.
Title: Re: Mission.lvl changes request
Post by: Kit Fisto on July 13, 2012, 07:53:22 PM
Thank you! Thank you! I'm gonna attempt to change the reinforcement count for geonosis tonight. I'll edit this post saying if I did/ didn't after I try. Thank you again Led!!!! :cheer:

EDIT: It won't work. Geonosis I mean. I wasn't able to change it.

EDIT AGAIN: Hey Buckler, for Coruscant could you fix the objectives if that's possible? Like:
Capture and Hold CPs
Hold the Main Hall
Can you do that by modifying the mission.lvl?
Title: Re: Mission.lvl changes request
Post by: Dark_Phantom on July 14, 2012, 10:40:41 AM
Before I found out there were tools that people like Battlebelk and Phobos and others had made, I did a lot of Hex Editing on the .lvl files.  Time consuming until I found what I was looking for.
As far as I know (and what has been stated earlier), you cannot replace a shorter one with a longer one (there are a few exceptions that I have found, but the mission.lvl won't let you get a longer one).
To change the units, first you must call up the all_inf_basic(*null*,desert,jungle,urban,snow) that you want.  Don't type in *null* LoL.  For example:
Search tat2.lvl and go up a little to see the units.  Stop at SIDE\all.lvl
Change all_inf_basicdesert to all_inf_basicjungle. Then go down and change all_inf_soldierdesert to all_inf_soldierjungle.  Note that you cannot change the rest because only soldier has "desert".
Save and go ingame.  Only the Soldier (jungle), pilot, and wookiee will show up because I think that the .req for "jungle,urban,etc." doesn't recognize the vanguard and marksman unless they are jungle too.  (But jungle looks the same as if you had just all_inf_basic so someone got lazy somewhere or I'm missing something... So i would just use all_inf_basic until someone finds any difference...) 
I have not found how to Hex Edit reinforcement counts. And those objectives are set in the core.lvl I think.

Edit: Soldier is only class with urban extension that i see...
EhPortal 1.34 © 2024, WebDev