Page 1 of 1

Fake-Console-Commands to edit map features

Posted: Thu Jan 05, 2012 11:41 am
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

Re: Fake-Console-Commands to edit map features

Posted: Thu Jan 05, 2012 2:55 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Thu Jan 05, 2012 4:56 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Thu Jan 05, 2012 11:15 pm
by Adrenalin
That would be really nice.

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 12:19 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 4:58 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 5:14 pm
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

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 7:40 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 8:28 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 8:39 pm
by Adrenalin
The first method also doesn't work with the 1.3 ingame.lvl . Crap -.-

Re: Fake-Console-Commands to edit map features

Posted: Fri Jan 06, 2012 10:16 pm
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.

Re: Fake-Console-Commands to edit map features

Posted: Sat Jan 07, 2012 7:47 am
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.

Re: Fake-Console-Commands to edit map features

Posted: Sat Jan 07, 2012 3:49 pm
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

Re: Fake-Console-Commands to edit map features

Posted: Sat Jan 07, 2012 4:23 pm
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.