Basic ODF Editing

Started by aeria., September 13, 2009, 12:24:00 PM

Previous topic - Next topic
Quote from: Radical_Pi on September 21, 2009, 09:08:49 PM
It's the curiosity of where the hashes are stored. So far, the only thing I have been able to figure out is that ODF parameters are hashed by the munger.
You've got a specific executable for every type of file munged. One of them is your ODFMunge.exe. That's probably what turns your intelligible parameters into the flags used in the .lvl files.

September 23, 2009, 04:14:05 PM #16 Last Edit: September 23, 2009, 08:19:39 PM by Radical_Pi
No, I checked in there. There is no reference at all to the names of the parameters

Also, you can type in "PurpleMonkeysRule" as one of the parameters and the munger says nothing.

EDIT I was able to generate a list of the output hashes for an ODF, and I believe this method may be used to create a human-readable version of the munged state of a file (yes, I mean ANY file that goes in an LVL). Theoretically I could use this to create a table of ODF outputs, but that still leaves me in the dark if I want to do anything with localization files :( The only way that would work for me (I have an idea for a project that would make the macs VERY happy) is if I could figure out the exact algorithm used to generate the hashes. I've already run a checker and none of the common hash types seem to work :(

Viruses are like the New York Lottery. "Hey, you never know"

Don't worry about localization, I've already cracked it. BF Mod Tools has two copies of a localization file - one in the ModID folder, and one I believe in Data/_SOURCE_PC. At munge, it combines these two files. The _SOURCE_PC version contains pretty much EVERYTHING. So all you have to do is make your new localizations, munge them and copy the munged output.

As for ODF decompiling, that's good news. If we can figure everything out now, and get an ODF decompiler assembled, perhaps a LUA decompiler isn't far off the horizon.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

I'm not talking only decompiling. That's why I need to figure out this hashing method they use

I've looked into decompiling the LUAs. The tools to do it are already in the mod tools, but you basically get ASM-like code instead of LUA. It's the kind of thing that a computer would have a hard time translating, but it wouldn't be impossible

Viruses are like the New York Lottery. "Hey, you never know"

I don't believe it, but I think I may have found the hashing algorithm. Under a disassembly, I found a section of code filled with a seemingly random group of code that reads in a string character by character and performs seemingly random math operations on it. I monitored that code for a few loops. It is activated numerous times, but on all of the times I saw it I got nothing related to the map run through the hasher. I can confirm that it generates a hash though, since it's a 4 byte value stored inside a 4 byte register. I can't check it right now, but there is a pretty simple way to check if it is the right one. All I have to do is read what it is hashing, put that in an ODF file, and read what the munger outputs on it :tu:

Viruses are like the New York Lottery. "Hey, you never know"


So a 'demunger' is possible for ODF files?
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

Might be. I can already read the munged ODFs, all I have to do is make that input-output table of the hashes and I can de-munge. Of course, it would take forever to build that table, unless I could use some sort of pre-made list of ODF options *cough documentation cough* and feed it into the hasher. Plus, if I get the algorithm, then I can go one step better: an ODF munger for mac

Viruses are like the New York Lottery. "Hey, you never know"

hi, i was wondering if any one can help me with the odf animation words for the force? i would like to use this in a regular troop and have it for the pilot. i would like to put a hero in place of the republic pilot and give him the foce animation. is it just words or is it more, like more files?

Well, heroes usually have their force powers, but they're commented out.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

i can get the lightsaber animation but want the force animation. is it a different word or different files?

Force animations are grouped together with the lightsaber animations.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

Wow I still need to finish this...


#TYBG

i can use the lightsaber animation and i get the melee attact. i would like to have the force choke or the push.

Here's my Mace Windu ODF to give you a rough guide.

[GameObjectClass]
ClassLabel = "soldier"
GeometryName = "rep_inf_macewindu.msh"

[Properties]
FootWaterSplashEffect = "watersplash_sm"
WaterSplashEffect = "watersplash_md"
WakeWaterSplashEffect = "watersplash_wade"

UnitType = "assault"
MapTexture = "troop_icon"
MapScale = 1.4

GeometryName = "rep_inf_macewindu"
GeometryLowRes = "rep_inf_macewindu_low1"

AnimationName = "all_inf_snowtrooper"

JetJump = "21.0" //The initial jump-push given when enabling the jet
JetPush = "0.0" //The constant push given while the jet is enabled (20 is gravity)
JetEffect = ""
JetFuelRechargeRate = "0.1" //Additional fuel per second (fuel is 0 to 1)
JetFuelCost = "0.0" //Cost per second when hovering (only used for jet-hovers)(fuel is 0 to 1)
JetFuelInitialCost = "0.5" //4initial cost when jet jumping(fuel is 0 to 1)
JetFuelMinBorder = "0.49" //minimum fuel to perform a jet jump(fuel is 0 to 1)

CollisionScale = "0.0 0.0 0.0"

WingModel     = "gen_wings"

HealthType = "person"
MaxHealth = 1200.0
AddHealth = 60.0

Acceleraton = 70.0
MaxSpeed = 6.5
MaxStrafeSpeed = 4.5
MaxTurnSpeed = 4.0

WeaponName1 = "rep_weap_lightsaber"
WeaponAmmo1 = 0
WeaponName2 = "rep_weap_inf_forcepush"
WeaponAmmo2 = 0
WeaponChannel2 = 1
WeaponName3 = "rep_weap_inf_forcepull"
WeaponAmmo3 = 0
WeaponChannel3 = 1

AimFactorPostureSpecial = 50
AimFactorPostureStand = 100
AimFactorPostureCrouch = 140
AimFactorPostureProne = 160
AimFactorStrafe = 60
AimFactorMove = 70



CAMERASECTION = "STAND"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.0 0.0 3.5"
TiltValue = "5.0"

CAMERASECTION = "STANDZOOM"

EyePointOffset = "0.0 1.8 0.0"
TrackCenter = "0.0 1.8 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "CROUCH"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.0 0.15 3.5"
TiltValue = "5.0"

CAMERASECTION = "CROUCHZOOM"

EyePointOffset = "0.0 1.3 0.0"
TrackCenter = "0.0 1.3 0.0
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"

CAMERASECTION = "PRONE"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.0 0.0 3.0"
TiltValue = "5.0"

CAMERASECTION = "PRONEZOOM"

EyePointOffset = "0.0 0.5 0.0"
TrackCenter = "0.0 0.5 0.0"
TrackOffset = "0.4 0.2 2.8"
TiltValue = "3.5"

AimValue = "1.0"

HurtSound                = ""
DeathSound              = ""
AcquiredTargetSound      = ""
HidingSound              = ""
//ApproachingTargetSound = ""
FleeSound               = ""
PreparingForDamageSound = ""
HeardEnemySound         = ""
ShockFadeOutTime        = ""
ShockFadeInTime         = ""
ShockFadeOutGain        = ""
ShockSound              = ""
ClothingRustleSound     = ""
LowHealthSound          = "com_inf_saber_ambient"
LowHealthThreshold      = "1.1"
FoleyFXClass            = "rep_inf_soldier"

NoEnterVehicles = 1

AISizeType = "SOLDIER"

DropItemClass = "com_item_powerup_ammo"
DropItemProbability = 0.20
NextDropItem = "-"
DropItemClass = "com_item_powerup_health25"
DropItemProbability = 0.05
NextDropItem = "-"
DropItemClass = "com_item_powerup_health100"
DropItemProbability = 0.0
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1