Fake-Console-Commands to edit map features

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Adrenalin
Recruit Womprat Killer
Posts: 5
Joined: Thu Jan 05, 2012 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 ZeldaSS HEGA
xbox live or psn: No gamertag set

Fake-Console-Commands to edit map features

Post by Adrenalin »

Hey guys,

I'm from Germany and my clan wants to make a funevent (bugging, flying etc.) in the future. Therefore we want to edit some features of the map like the maximum flying height. But we don't know all lua commands for our wishes. Plz help us.

1. Editing Flying height
-> SetMaxPlayerFlyHeight(900)

2. Deleting boundaries ("Leaving Battlefield")
-> no idea

3. Deleting invisible walls (like that ones, which prevent the possebility to get into the front garden of the palace in Naboo)
-> no idea

4. Becoming immortal (inlcluding tanks)
-> no idea

Thx for ur help.

regards
Adrenalin
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

hi, im afraid the invisible walls on naboo and tatooine cant be deactivated. they are built out of many individual box-shaped objects which are simple props so their properties cant be modified through lua.

for the invncible units and vehicles, use "setclassproperty" to set their maxhealth(maximumhealth) curhealth (current health) and maybe addhealth (healing) to really high numbers.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: Fake-Console-Commands to edit map features

Post by Dakota »

DarthD.U.C.K. wrote:hi, im afraid the invisible walls on naboo and tatooine cant be deactivated. they are built out of many individual box-shaped objects which are simple props so their properties cant be modified through lua.

for the invncible units and vehicles, use "setclassproperty" to set their maxhealth(maximumhealth) curhealth (current health) and maybe addhealth (healing) to really high numbers.
2 and 3 are possible but i don't think its possible through LUA, a friend of mine got it working somehow for a dedicated server making a mission.lvl and maybe changing the map but i don't know how he did it and he isn't on this site. i may try to contact him.
Adrenalin
Recruit Womprat Killer
Posts: 5
Joined: Thu Jan 05, 2012 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 ZeldaSS HEGA
xbox live or psn: No gamertag set

Re: Fake-Console-Commands to edit map features

Post by Adrenalin »

That would be really nice.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

so i though...and i have though of two approaches to get rid of the collision objects(assuming collision is serversided):
first: open the levelfiles with a hexeditor (e.g. nab2.lvl) and serahc for "com_inv_col" and rename that phrase to something like "no_more_col". this should prevent the game from finding the odfs of the collisions.

second: (and more elegant) create a map with visualmunge, go to common\odfs\, open all com_inv_col odfs and put in "SoldierCollision = "none"" or change the geometryname under properties. then munge and replace the original ingame.lvl in battlefronts installation folder with the one in data_yourmodmapid\_lvl_pc\.

for both ways you have to do that with the server files of course. i know this isnt lua editing but i dont think you can remove the collisions just through lua.
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Re: Fake-Console-Commands to edit map features

Post by fasty »

One way to do it through lua would be to go into ZE, get the names of the objects and then do KillObject("objectname") into a new mission.lvl or it could be done through code console. The collision objects are probably in the base layer, so if it doesn't work, that's why.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

the problem with that is that you can only manipulate e.g. kill objects like buildings, units etc., but not entitys like props
Adrenalin
Recruit Womprat Killer
Posts: 5
Joined: Thu Jan 05, 2012 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 ZeldaSS HEGA
xbox live or psn: No gamertag set

Re: Fake-Console-Commands to edit map features

Post by Adrenalin »

Thx Duck, it works now. :D [the last method only]

But now i have another problem: The fake Console don't work now. I tried to uninstall and reinstall, but when I reinstalled it, the invisible objects returned. That's not so nice. -.- I used the 1.3 patch to get the console.

And plz also help concerning the boundaries. They are really annoying.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

ah, darn. the facekonsole is scripted into the ingame.lvl and is lost when you replace the 1.3 patches .lvl file.
i guess you could only hexedit the 1.3 patches ingame.lvl to change the name of the collision object odfs.
Adrenalin
Recruit Womprat Killer
Posts: 5
Joined: Thu Jan 05, 2012 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 ZeldaSS HEGA
xbox live or psn: No gamertag set

Re: Fake-Console-Commands to edit map features

Post by Adrenalin »

The first method also doesn't work with the 1.3 ingame.lvl . Crap -.-
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: Fake-Console-Commands to edit map features

Post by Dakota »

best bet is to host it from a dedicated server and if you need console commands you could make a custom mission.lvl, thats where you could put the codes for the health of units.

theres a topic here somewhere i'll be back with the link.

i have the quote that tells how its done.
[color=#FF8040]fasty[/color] wrote:1) Make a new map and delete all the lua files for it.
2) Go into the assets and get all the luas of all the stock maps you want in your server.
3) Put them into your new maps common/scripts/abc folder and make changes to them (add the code I mentioned).
4) Add the three letter names of the stock maps you're adding in the mission.req in data_abc/common.
5) Munge with common checked then go into your munged maps folder and copy the mission.lvl
6) Paste it in your servers files C:\Program Files (x86)\LucasArts\Star Wars Battlefront II PC Server\data\_LVL_PC
If you want to see this in action go join the Gamerz Hero FFA|NoForce/Guns server and see for yourself.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

Adrenalin wrote:The first method also doesn't work with the 1.3 ingame.lvl . Crap -.-
you mean in my first post? hexedit the 1.3patchs ingame.lvl i just tried it and it works. you cant get out of the map well on naboo because some houses as well as the bushes have large additional collisions in their models.
Adrenalin
Recruit Womprat Killer
Posts: 5
Joined: Thu Jan 05, 2012 11:31 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 ZeldaSS HEGA
xbox live or psn: No gamertag set

Re: Fake-Console-Commands to edit map features

Post by Adrenalin »

That's confusing. I used the MS Hex-Editor of Chip http://www.chip.de/downloads/Hex-Editor ... 51843.html . Maybe there's another better one!? Would you be so kind to send me the ingame.lvl? Cause I don't know why it isn't working. -.-

EDIT: Now it is working. I failed with the editor and only edited the words, but not the concerning numbers. So thx for this method. :bowdown: And also thx for the method of Dakota, but I can't test it now, because I don't have a server.

EDIT2: Now there are two problems left:
- deleting the boundaries
- deleting death-areas [this is new]

It would be really great, if u could tell me a method to get this things working. I don't care if it works with lua or just with editing the ingame.lvl .

regards
Adrenalin
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Fake-Console-Commands to edit map features

Post by DarthD.U.C.K. »

you can remove the boundary by hexediting the maps .lvl file: search for "boundary" and rename it to something else like "noundary". im sure there is a better way to do this though.
for deathregions you can probably do the same.
Post Reply