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

Current state of coding?

Coder-centric area for programming advice and questions.

Current state of coding?

Postby ynh » 22 Apr 2014, 11:44

Hi guys, thanks for all the work you do here! It's incredible to see how far ME modding has come.

Anyway, the purpose of my post is to ask: How much can C++ and UnrealScript programmers do with the current tools we've got? I know you can use UE3 SDK generators to create the C++ half of the mass effect games. Have people been able to write and compile their own unrealscript code for ME? If not, what areas currently need research to get that far?
ynh
User
 
Posts: 5
Joined: 22 Apr 2014, 11:41
Has thanked: 0 time
Have thanks: 0 time

Re: Current state of coding?

Postby WarrantyVoider » 22 Apr 2014, 11:56

this is about the SDK, using it, you literally write unreal script functions, as you can replace them with the SDK c++ code:

me3-on-the-hook-t305.html

about the internal Script format, its saved as tokens, thats why you can recreate the souce code, but I have no time to write a compiler for that, so if you are interested:

done-research-script-byte-code-t16.html

and me3ex has a tool called UE Code Editor under crazy tools, which should edit single tokens in the decompiled tree, but I never got around to finish it

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current state of coding?

Postby ynh » 22 Apr 2014, 11:58

Woah thanks for the quick reply. I will take a look at this stuff when I get home :)
ynh
User
 
Posts: 5
Joined: 22 Apr 2014, 11:41
Has thanked: 0 time
Have thanks: 0 time

Re: Current state of coding?

Postby WarrantyVoider » 22 Apr 2014, 13:13

yeah np^^ as I dont have time for this anymore, all I can hope for is that someone picks my research up and completes it, so thats why :P

greetz WV

PS: another unresearched path: you can actually call .dll from unrealscript code, over DllBind, that means you can add code in c++ and dont need to worry about the tokens, but I know even less about this: http://udn.epicgames.com/Three/DLLBind.html
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current state of coding?

Postby ynh » 22 Apr 2014, 13:33

I guess one of the questions I have is: Don't all Unreal Engine executables have a 'make' commandlet built in? Did they disable/remove this functionality in Mass Effect? Do I even need to write an unrealscript compiler if the engine already has one built in?

EDIT: Turns out that commandlet is in the UnrealEd package which is not shipped with ME3 (I don't think). I wonder, is it possible to port over the UnrealEd package from another UDK/Unreal Engine game have have it work? I mean I doubt it but I wonder if it's worth exploring.
ynh
User
 
Posts: 5
Joined: 22 Apr 2014, 11:41
Has thanked: 0 time
Have thanks: 0 time

Re: Current state of coding?

Postby WarrantyVoider » 22 Apr 2014, 14:22

well if you look at .pcc/.upk files as class definition files, the compiler has to be able to read the package, so you would need the UCC.exe of the development of ME3. as I googled this, yeah, maybe they even made it built-in in me3, maybe I look into that, but as far as I have tested and reverse engineered, I saw no commandline handler, all it does, is try to load your argument as level (try f.e. MassEffec3.exe entry.pcc). btw the idea would be to get the "old" ucc.exe and try to refind its functions in me3.exe, then look where it got disabled. but as I read, (if) its actually included, then in the server side executable. same with the editor, you will find alot classes and resources left in the game for the editor, and I also heard, licensed UE3 devs can actually read all the the other game files and load them into their UDK version, but its a myth to me, as alot stuff the editor would need is stripped off the packages (cooked) and for me3.exe to have the editor still inside, is unlikely, because then we should find also resouces of the editor (names, strings, icons, dialogs, etc...), so I doubt that. me3ex/me3cr are simply my attempt at writing such an editor, and you can guess how much work is left :D

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current state of coding?

Postby ynh » 22 Apr 2014, 14:56

PCCs are compressed though aren't they? So you'd have to have the code to ucc.exe. Unreal 3 games use commandlets (uscript compilation done in me3.exe) so you're screwed :(

I guess the best you can do is use the UE3 SDK generator (C++) then bind it to a scripting language like python.
ynh
User
 
Posts: 5
Joined: 22 Apr 2014, 11:41
Has thanked: 0 time
Have thanks: 0 time

Re: Current state of coding?

Postby WarrantyVoider » 22 Apr 2014, 15:27

well, its compressed, and? game runs fine with uncompressed files aswell, pcced2 can edit both. its about the content. and about the commandlets, well its seems they are defined in some .pccs too (I guess core, engine and sfxgame) so dunno, they are compiled script functions in tokens again, and are simply executed, but not compiled in that sense, so you have to create the tokens first and then execute them. you could maybe write a compiler with the SDK and our knowledge about the package format, but thats even over my head^^ btw it seems that the coalesced.bin contains all available commandlets, that you can use from ingame console (my patcher activates that too). still this is not helpful in creating permanent content. sure you could write a dll that loads the stuff in for you, mimics all needed functions and takes over the gameflow, this way you could even write another game inside me3, I mean its just an engine that plays content, wherever that comes from, but thats far from feasable :D

TL;DR: its faaar easier and more realistic, to make a simple tokeneditor, and the coder plays the "compiler"

source: http://wiki.beyondunreal.com/Legacy:Commandlet

greetz WV

PS:check PM, we do have sources :P
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current state of coding?

Postby ynh » 22 Apr 2014, 16:54

WarrantyVoider wrote:well, its compressed, and? game runs fine with uncompressed files aswell, pcced2 can edit both. its about the content. and about the commandlets, well its seems they are defined in some .pccs too (I guess core, engine and sfxgame) so dunno, they are compiled script functions in tokens again, and are simply executed, but not compiled in that sense, so you have to create the tokens first and then execute them. you could maybe write a compiler with the SDK and our knowledge about the package format, but thats even over my head^^ btw it seems that the coalesced.bin contains all available commandlets, that you can use from ingame console (my patcher activates that too). still this is not helpful in creating permanent content. sure you could write a dll that loads the stuff in for you, mimics all needed functions and takes over the gameflow, this way you could even write another game inside me3, I mean its just an engine that plays content, wherever that comes from, but thats far from feasable :D

TL;DR: its faaar easier and more realistic, to make a simple tokeneditor, and the coder plays the "compiler"

source: http://wiki.beyondunreal.com/Legacy:Commandlet

greetz WV

PS:check PM, we do have sources :P


Sorry -- When you say 'token' you mean bytecode right? The word token is throwing me off :lol:

It sounds like there are a few problems I'd face to even executing unrealscript:
1) Actually turning my script into bytecode that I can load into ME3.
2) Preprocessing: How can I use data types like ABioPawn or SFXGame in my script?
3) Loading the code into ME3.

With the token editor you mention, you're limited to doing very small changes right? I can't say, add in a completely new weapon to the game.

With that in mind, some questions I have are:
1 -- Can we decompile and dump ALL of the unrealscript for Mass Effect 3?
2 -- Can (and should) we create a custom 'ModScripts.u' package to put custom unrealscript in?

I'm hoping I can use your unhood changes to achieve #1. #2 I think is necessary for the compiler / make commandlet. I think the real hurdle is trying to figure out how to compile custom unrealscript code into unrealscript byte code.
ynh
User
 
Posts: 5
Joined: 22 Apr 2014, 11:41
Has thanked: 0 time
Have thanks: 0 time

Re: Current state of coding?

Postby WarrantyVoider » 22 Apr 2014, 18:38

you can read pretty much all tokens, just use pcced2 and select a "function" object (there are no other classes with script code). you get an extra tab, that decompiles it for you (as seen in research). a token is a midstep between sourcecode and machinecode, its in principal the AST (abstract syntax tree) tokens, dunno how much you know about compilers. in short it goes like this:
-read source code as text
-make it a list of words and special signs, f.e.:
(a + b) * c
becomes:
0. (
1. a
2. +
3. b
4. )
5. *
6. c
-create the AST
Image
-for each node (token), create actual machine code

as unreal engine uses a virtual machine (VM), those tokens functions are included as hardcoded function. as you see it uses names and objects too, these are refrenced over unreal index (<0 Import, >0 Export) or over the namelist. so lets take the token a + b: you got some bytecode (yes!) that represents the adding function of two integers, followed by the two index of them. that entire bytesnipped is then included in the Expression * Expression token, and so on. that means, like properties (see research) its essentially a list of nested tokens

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time


Return to Coders' Help

Who is online

Users browsing this forum: No registered users and 1 guest

suspicion-preferred