Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Done Research: Script byte code

Technical research related to the structure of Mass Effect game files.

Re: Done Research: Script byte code

Postby Heff » 17 Jul 2015, 14:06

FemShep wrote:At the bottom of some functions it seems to call itself again (like Initialize). Is this like super.Initialize?

Yep, still working on some of the calling convention details, but it's either super.Initialize or something deeper like super("Pawn").Initialize etc.
Once this is done, I think I only have default property support left.
Heff
Coder
 
Posts: 164
Joined: 23 Feb 2015, 20:02
Has thanked: 93 time
Have thanks: 61 time

Re: Done Research: Script byte code

Postby FemShep » 17 Jul 2015, 14:28

Have you thrown the big pcc files like bio_MP_common at this? Or sfxgame?
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

Re: Done Research: Script byte code

Postby Heff » 17 Jul 2015, 20:51

Okay, so support for super calls is in, it'll prefer to be explicit in the cases where the dependency PCCs haven't been loaded, so that it's obvious which class is intended.

[quote="FemShep"]Have you thrown the big pcc files like bio_MP_common at this? Or sfxgame?

Took quite a bit of fixing, but now I can run in on SFXGame, which is pretty darn huge codewise.
A lot of special cases of bytecode here not seen in any other games and only seen here / in engine.pcc, so the output is not perfect, but pretty close to where one would want it to be.
Besides a few unsupported opcodes and really weird calls to the "new" operator, everything seems to check out.

A full dump of SFXGame.pcc can be found here.
(This is without bytecode debug output for easier reading)

Once I've fixed the last few codes, and test run it on all PCC's, I'll integrate it into PCCEd.
Hopefully sourceforge has solved their **** by then :P.
Heff
Coder
 
Posts: 164
Joined: 23 Feb 2015, 20:02
Has thanked: 93 time
Have thanks: 61 time

Re: Done Research: Script byte code

Postby FemShep » 17 Jul 2015, 21:31

Another thing, those return var;return null, what exactly is that for? If the object is null does UE3 not default to null?
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

Re: Done Research: Script byte code

Postby Heff » 17 Jul 2015, 21:36

FemShep wrote:Another thing, those return var;return null, what exactly is that for? If the object is null does UE3 not default to null?


I'm unsure about the purpose of those, as not all functions have them.
Bytecode-wise it's actually: Return (ReturnNullValue (ReturnValueVariable))
So it's very explicit, my best guess right now is that their internal compiler / tools autogenerate these for safety, and doesn't optimize them away if unnecessary.
Compiling with UDK doesn't seem to yield any extras like that, so it's probably bioware-specific.
Heff
Coder
 
Posts: 164
Joined: 23 Feb 2015, 20:02
Has thanked: 93 time
Have thanks: 61 time

Re: Done Research: Script byte code

Postby FemShep » 17 Jul 2015, 21:38

Interesting.

Any chance you could dump bio_mp_common so I could peruse it? Output looks great, much nicer to read with normal logic instead of inverted. Good work.
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

Re: Done Research: Script byte code

Postby Heff » 17 Jul 2015, 21:46

FemShep wrote:Interesting.

Any chance you could dump bio_mp_common so I could peruse it? Output looks great, much nicer to read with normal logic instead of inverted. Good work.


Happy that someone else is appreciating it, I think we have much we can learn with increased readability and structure of the source.

This dump played nicely, nothing new. Still might contain some unsupported stuff, but that's annotated in that case.
http://heff.se/ME3/BIOP_MP_COMMON_ScriptDump.zip


Now to get some sleep and hope that SF is up by the time I wake up.

Heff has been thanked by:
Heff
Coder
 
Posts: 164
Joined: 23 Feb 2015, 20:02
Has thanked: 93 time
Have thanks: 61 time

Re: Done Research: Script byte code

Postby FemShep » 17 Jul 2015, 22:23

Already found some goodies. We previousy did not know what some of the Cheat Manager functions were, but I think all of these are callable via the console, in MP:

  • CheatCardPack PACKNAME (This one does not charge credits)
  • CreditsCardPack PACKNAME (This one charges credits)
  • GiveAllMatchConsumables
  • GiveAmmoConsumable QUANTITY (gives Thermal Clip pack)
  • GiveReviveConsumable QUANTITY
  • GiveRocketConsumable QUANTITY
  • GiveShieldConsumable QUANTITY
  • GiveMPConsuambles QUANTITY (combines all above 4)
  • TestHostile (writes hostility debug info to the ClientMessage function)
  • ReplicationDebugCam (toggles god mod and goes into some replicaton debugger)
  • unlockallmpcards (gives level 1 of every MP card)
  • showallmpcards (same as above, but does not actually give. really useful for store editing)
  • TestPurchaseEntitlement (appears to grant purchased... something...?)
  • skipwave (kills all enemies spawned by this wave if at least 1 player is up, moves to next wave)
  • toggleendlesswave (makes wave never end, assuming wave budget is not depleted)

The packnames I think are defined in the live balance changes, with this I may be able to access the dozens of packs not available to the public, such as the fabled premium veteran pack and premium jumbo pack. If none is entered it seems to default to a pack named n7.

Some more interesting thigns to look at:
  • CheckOfferVisibility function returns false at the end - if forcing to true, perhaps it will show all offers even if you aren't technically allowed to see them (SFXGAWReinforcementManager)
  • testfalling TARGET
  • setmood PAWN, MOOD
  • SetIntByName VAR, VALUE
  • SetBoolByName VAR, VALUE
  • RevivePawn PawnName

It looks like team chat was at least not-planned for removal, as they modified the method that posts the messages to the screen:
Code: Select all
if (msgType == 'Say' || msgType == 'TeamSay') {
      Msg = PRI.PlayerName $ ": " $ Msg;
      AddConsoleMessage(Msg, Class'SFXMessageMP', PRI, Lifetime);
   } else {
      AddConsoleMessage(Msg, Class'LocalMessage', PRI, Lifetime);
   }


There's also code in here about the gamemode for illusivemanconflict, the original final boss. There appears to have been a minigame (startMiniGame()) and the ridicule starts between anderson and the illusive man. If I had to venture a guess, I'd say the illusive man was attempting to control shepard to shoot anderson, and you had to fight back somehow. Instead we just go the standard paragon/renegade because they said screw it at the end.

Seems to be that the standard cheat manager is also really big, I bet theres lot of juicy goodies in here.

Their HTTP system test pings google instead of their own server:
Code: Select all
function TestHTTPSystem(  )
{
   local object Job;
   Job = Class'SFXOnlineJobHTTPRequest'.static.CreateHTTPRequestJob();
   Job.mRequest.SetBaseURL("http://www.google.com/");
   Job.__OnJobComplete__Delegate = HTTPResult(None);
   Class'SFXOnlineSubsystem'.static.GetOnlineSubsystem().GetComponentJobQueue().AddJob(Job);
   return;
}


Interestingly, the ticker in MP is done using HTML. Using this you could technically send custom messages to clients with the hook possibly.
Code: Select all
SFXGRI(Outer.WorldInfo.GRI).GetEventTicker().AddTickerEntry("<font color="#FF0000">MP HUD</font> Ticker Entry #" $ string(N + 1) $ "<font color="#00FF99">(" $ string(BioWorldInfo(Outer.WorldInfo).TimeSeconds) $ ")</font>");


List of moods, likley indexed at 0:
Code: Select all
enum EAICombatMood {
   AI_NoMood,
   AI_Unaware,
   AI_Fallback,
   AI_Normal,
   AI_Aggressive,
   AI_Berserk,
   AI_MAX,
};
You can use this with setmood PAWN mood

=====================
Found a method that looks like a friendly fire checking in SFXModule_DamagePlayer (in SFXGame):
Code: Select all
// Functions
function SFXTakeDamage( float Damage, object HitInfo, object HitLocation, object Momentum, class DamageType, object instigatedBy, object DamageCauser )
{
   local object DamageCauserPawn;
   DamageCauserPawn = Class'BioPawn'.static.FindAttackingPawn(instigatedBy, DamageCauser);
   if (SFXPawn_Henchman(DamageCauserPawn) != None) {
      return;
   }
   super.SFXTakeDamage(Damage, HitInfo, HitLocation, Momentum, DamageType, instigatedBy, DamageCauser);
   return;
}

I don't know if SFXPawn_Henchman is a method or a cast, but either way I think its checking if its a "Friendly". That return seems to negate teh take damage effet. I don't know how the "stop shooting" noise is made though.
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

Re: Done Research: Script byte code

Postby Erik JS » 18 Jul 2015, 13:58

FemShep wrote:Already found some goodies. We previousy did not know what some of the Cheat Manager functions were, but I think all of these are callable via the console, in MP:

Just a little info on how this "callability" is defined...
Functions intended to be used as console commands are flagged as Exec.
Spoiler:
Image


Do you guys remember this?
http://www.mediafire.com/view/5oa8bw8jask10a2/ue3_cheattestmessage1.png
^ exec function CheatTestMessage() ^

http://wiki.beyondunreal.com/Functions#Call_modifiers

FemShep wrote:Some more interesting thigns to look at:
  • SetIntByName VAR, VALUE
  • SetBoolByName VAR, VALUE

There's also setplotstate/getplotstate. Example:
setplotstate int 12345 999 - set int plot var 12345 to 999
getplotstate int 12345 - prints 999 via ClientMessage

FemShep wrote:Found a method that looks like a friendly fire checking in SFXModule_DamagePlayer (in SFXGame):

I'm not trying to stop you, because if you don't do this, someone else will, but this has great potential to be abused by idiots to screw public games. Just saying.
ME3 Private Server Emulator: @ ME3Tweaks | @ SourceForge | @ GitHub | @ Dropbox
Image

Erik JS has been thanked by:
User avatar
Erik JS
User
 
Posts: 124
Joined: 31 Jul 2014, 14:44
Has thanked: 13 time
Have thanks: 77 time

Re: Done Research: Script byte code

Postby FemShep » 18 Jul 2015, 14:46

I'm not trying to stop you, because if you don't do this, someone else will, but this has great potential to be abused by idiots to screw public games. Just saying.

If I figured it out I probably wouldn't disclose exactly how, and my mod I'd make I likely wouldn't release. If I did though I'd ship it with public games disabled like I did with some of my older mods. Doubtful as I'm sure people would abuse it.
Image
ME3Tweaks has modding guides, tools, forums for mods, a modding wiki, and ModMaker, an online mod creation tool.
ME3 Mod Manager, the civilized way of installing and managing ME3 mods.
ME3Tweaks Facebook Page
User avatar
FemShep
Modder
 
Posts: 1101
Joined: 18 Oct 2012, 20:48
Has thanked: 42 time
Have thanks: 76 time

PreviousNext

Return to Technical Research

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred