Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - BAD_AL

#16
Other Games / Re: Star Wars: Jedi: Fallen Order
July 17, 2020, 03:21:28 PM
I was totally immersed when playing this game (played through on Xbox One X).

Sliding around in the mud of Kashyyyk, exploring Dathomir, taking in the scenery of broken up At-Ats and LAATs.
It was really a beautiful experience just taking in all the scenery. I felt the artwork included in the game was just breathtaking to take in and I really appreciate the how much work the game artists must have put in to create this gem.

I was shocked that EA allowed such a great experience to get released.

It's not a perfect game, but was really enjoyable to play through and explore the content included.
#17
Other Games / Re: Star Wars: Jedi: Fallen Order
July 17, 2020, 07:38:09 AM
No noise after release?
Am I the only one here who loved this game?
#18
SWBF2 Modding / Re: PC Shell interface
July 15, 2020, 10:36:37 PM
Ok, that explains why I didn't see anything print out :)

I switched to print out stuff in the input functions on 'ifs_pc_spawnselect' and am able to see print output now :)
I'm trying to print out what 'this' is in the context of those functions in order to get at the buttons on the screen but have only been able to print out a partial for some reason.
Here's the screen info I was able to extract:
[spoiler]
{
   cancelSound = "shell_menu_cancel",
   fnPostError = "function: 061D40A8",
   Input_GeneralDown = "function: 061D7138",
   HandleMouse = "function: 061D41B0",
   enterSound = "",
   Leave = "function: 061D4180",
   acceptSound = "shell_menu_accept",
   BotInfo = {
     type = "container",
     inert = "1",
     y = "0",
     x = "0",
     cp = "userdata: 07D87AC0",
     ScreenRelativeX = "1",
     ScreenRelativeY = "1"
   },
   Input_GeneralUp = "function: 061D7120",
   exitSound = "shell_menu_exit",
   Input_Back = "function: 061D70D8",
   errorSound = "shell_menu_error",
   nextFlashyTime = "17.252716064453",
   nologo = "1",
   type = "screen",
   Info = {
     SlotWindow6 = {
      titleBarElement = {
        startdelay = "0",
        type = "text",
        flashy = "1",
        cp = "userdata: 07D87D10"
      },
      onTexture = "btn_on_pieces",
      skin = {
        cp = "userdata: 07D88140",
        type = "border",
        ZPos = "135"
      },
      x = "100.80000305176",
      buttonHeightPad = "1",
      type = "buttonwindow",
      InfoText = {
        startdelay = "0",
        cp = "userdata: 07D8ャ・qテ{
[/spoiler]
Looks like the string somehow got corrupted at the end.
Perhaps someone has a better 'print_table' function?
I'm using this one (which returns a big string):
[spoiler]
-- from http://lua-users.org/wiki/TableSerialization
function table_print (tt, indent, done)
  done = done or {}
  indent = indent or 0
  if type(tt) == "table" then
    local sb = {}
    for key, value in pairs (tt) do
      table.insert(sb, string.rep (" ", indent)) -- indent it
      if type (value) == "table" and not done [value] then
        done [value] = true
        table.insert(sb, key .. " = {\n");
        table.insert(sb, table_print (value, indent + 2, done))
        table.insert(sb, string.rep (" ", indent)) -- indent it
        table.insert(sb, "}\n");
      elseif "number" == type(key) then
        table.insert(sb, string.format("\"%s\"\n", tostring(value)))
      else
        table.insert(sb, string.format(
            "%s = \"%s\"\n", tostring (key), tostring(value)))
       end
    end
    return table.concat(sb)
  else
    return tt .. "\n"
  end
end

function to_string( tbl )
    if  "nil"       == type( tbl ) then
        return tostring(nil)
    elseif  "table" == type( tbl ) then
        return table_print(tbl)
    elseif  "string" == type( tbl ) then
        return tbl
    else
        return tostring(tbl)
    end
end
[/spoiler]
#19
SWBF2 Modding / PC Shell interface
July 15, 2020, 12:19:05 PM
I've always preferred the Console interface (up,down,left,right,a,b) to the PC's forced mouse and keyboard use.
I feel it's just faster to use the buttons(up,down,left,right,accept,back).

Also, with the possibility of playing the game under a WindowsXP Virtual Machines or Wine on various mobile platforms, I think it would be good to have a console style interface option on the PC version of the game.

Looking into the feasibility of this led me to discover the following functions on the shell screens:
[spoiler]
   Input_Accept = function(this) ...
   Input_Back = function(this)  ...
   Input_GeneralLeft = function(this,bFromAI) ...
   Input_GeneralRight = function(this,bFromAI) ...
   Input_GeneralUp = function(this,bFromAI) ...
   Input_GeneralDown = function(this,bFromAI) ...
[/spoiler]
These functions receive (and process) the events from the Up, down,left,right,accept,back buttons.
The screen where I spend the most (annoying) time moving the mouse around is the character select screen ( ingame.lvl 'ifs_charselect.lua').
But there's a problem. Looking at the source code we get the following message/comment:
[spoiler]
ifs_charselect1 = NewIFShellScreen {
   nologo = 1,
   bDimBackdrop = 1,
   -- Actual contents are created in ifs_charselect_fnBuildScreen

   -- Note: for now, the exe is handling all the inputs/events, so this
   -- screen has no Enter/Exit/Update/Input handlers.
It does have an
   -- Input_Back handler to override the base class's default functionality
   -- (go to previous screen)

   Input_Back = function(this)
   end,
   Input_GeneralLeft = function(this,bFromAI)
   end,
   Input_GeneralRight = function(this,bFromAI)
   end,
   Input_GeneralUp = function(this,bFromAI)
   end,
   Input_GeneralDown = function(this,bFromAI)
   end,
}
[/spoiler]
Which makes it sound like for this screen, we cannot process the up,down,left,right,b buttons in the lua code.

When putting print statements in these functions, I never saw output and got kinda bummed.
Anyone else try this with success on this screen? (hoping I just messed something up in my testing)
Is there more to the puzzle that someone else is aware of?
#20
SWBF2 Modding / Re: SWBF mvs files discussion
June 30, 2020, 08:38:21 PM
Quote from: Dark_Phantom on June 19, 2020, 05:15:09 AM
I felt it was quicker in the long run to do it that way.  Psych0fred (a developer of the game) was nice enough to run their HashDirectory program on his folders so that I had the names of all the files. I used Excel functions to trim everything down to only what I needed. The files that are generated with a hash name in my program either do not have a name in his folders or were renamed during munge in the .sfx or .stm files.

The cool thing is that the program can be used to reverse hash as well.  Now, you likely aren't going to get the same name unless you sit for a LONG time (8 characters is when it starts becoming ridiculous to wait, which makes sense because it's getting exponentially bigger).  What you can do, is if you are trying to recreate a stock file for the game (like common.bnk) but it can't find the name, you can run reverse hash to generate a name that will give it the same hash in the sound file.

Edit: there was also an idea that if people supplied the hash pairs to their files they could be extracted again with the same name, but I didn't know if that would catch on or not.  It was kind of an edge case, but I have definitely manually added names in the list that weren't generated the first time around.

EDIT 2:  @ BAD_AL i confirmed I was searching for the wrong bytes in .mvs files to compare against.  The hashes are definitely in there, and at the time I was too lazy to do anything with them. (Fun fact, it should only be a small code rewrite, I don't have to change the hash pairs file because it's correct.)

Yes, looking at this last night I did fund the following hashes in the xbox shell.mvs file:

location:0x24; hash:0x11e1fc01: shell       
location:0x3c; hash:0xfe2fc846: shell_main1
location:0x5c; hash:0xfd2fc6b3: shell_main2
location:0x7c; hash:0x5c30920e: shell_suball1
location:0x9c; hash:0x5b30907b: shell_suball2
location:0xbc; hash:0x95c29a10: shell_subcis1
location:0xdc; hash:0x98c29ec9: shell_subcis2
location:0xfc; hash:0x2dce2e3d: shell_subimp1
location:0x11c; hash:0x2ace2984: shell_subimp2
location:0x13c; hash:0x92ef3a6: shell_subrep1
location:0x15c; hash:0x82ef213: shell_subrep2
location:0x17c; hash:0xbac76daa: cor1tran1
location:0x19c; hash:0xf1c1532c: dea1tran1
location:0x1bc; hash:0xc00a9f2d: fel1tran1
location:0x1dc; hash:0xee3ec9f9: hot1tran1
location:0x1fc; hash:0xafefaf99: kam1tran1
location:0x21c; hash:0x2950238: kas2tran1
location:0x23c; hash:0x4f3a1981: mus1tran1
location:0x25c; hash:0x55ab8611: myg1tran1
location:0x27c; hash:0x20579dcb: nab1tran1
location:0x29c; hash:0xd9503729: pol1tran1
location:0x2bc; hash:0x839573d5: sb1tran1
location:0x2dc; hash:0x36f9d9ce: sb2tran1
location:0x2fc; hash:0xe8b7dcc7: sb3tran1
location:0x31c; hash:0xa62393d8: sb4tran1
location:0x33c; hash:0xb7b223fd: tan1tran1
location:0x35c; hash:0x6d770b22: uta1tran1
location:0x37c; hash:0xeb3f9b96: yav1tran1
location:0x39c; hash:0xb4a21ed9: gcwinall1
location:0x3bc; hash:0x3d379d5f: gcwincis1
location:0x3dc; hash:0x3bc33baa: gcwinimp1
location:0x3fc; hash:0x72e4c431: gcwinrep1
location:0x41c; hash:0x601d5913: attractcw1
location:0x43c; hash:0xad7828b4: attractgcw1
location:0x45c; hash:0x9bb7a572: training1

That's one more hash than xmv file pulled out, so probably that the first hash is the title of the list, the rest are movie file names.
#21
For SWBF2 there is this mod that has a custom campaign:
http://gametoast.com/viewtopic.php?f=74&t=23684

The download for that includes a installer exe.
In this mod I'm pretty sure the modder distributed his own shell.lvl file to the 'data/_LVL_PC/' folder; overwriting the one the game ships with.

I frown on that method, but do not currently have a better method to share.
#22
Released Assets / Re: swbf-unmunge - v1.1.1
June 28, 2020, 09:26:39 AM
Quote from: SleepKiller on June 19, 2020, 09:00:05 PM
Maybe! I have ideas for at least one more update to swbf-unmunge. A key one is having a preprocess function that goes through a list of .lvl files and builds a list of hashes from the strings in them for later use during the actual "unmunging". If that next release happens I will for sure look at also including the ability to specify custom hash lists as well.
Looking at the .lvl files, the mission.lvl file is a good string capture target.
But which others?  And of those, which sections?

#23
SWBF1 Modding / Re: SWBF1 Lua Decompiler (WIP/beta)
June 25, 2020, 11:41:58 AM
Yea, looks like there are more instructions in Lua 4;
Here's a look at all the opcodes:
http://www.lua.org/source/4.0/lopcodes.h.html

This one looks pretty well documented for source code.
#24
SWBF2 Modding / Re: SWBF mvs files discussion
June 25, 2020, 06:00:20 AM
Quote from: Dark_Phantom on June 25, 2020, 05:15:24 AM
It's almost definitely CyclePlayback.  I'm not at my home PC or I would actually hash it so you know for sure.
Yep, that's what it is!

I'll add that one to the dictionary.

Thanks Phantom  :D
#25
SWBF1 Modding / Re: SWBF1 Lua Decompiler (WIP/beta)
June 24, 2020, 11:06:58 PM
Cool,
I started one for Lua 5, but got unmotivated to continue when I was looking at the TEST & JMP operations (and/or logic).
I don't really remember why I stopped and I think it's entirely possible to get something pretty close to source.

Perhaps we can work together and discuss?

I posted a Lua 5 VM instruction manual at:
https://github.com/BAD-AL/SWBF2_Xbox_mod_effort/blob/master/SWBF2CodeHelper/ANoFrillsIntroToLua5VMInstructions.pdf

Did you find a similar one for Lua 4?
#26
SWBF2 Modding / Re: SWBF mvs files discussion
June 24, 2020, 10:55:05 PM
I've been messing around with swbf-unmunge and was able to make some fixes to the way it handles the config files (I've actually only tested it on shell.lvl though).
But I was able to extract the 'shell_movies.mcfg' file with the exception of 1 string; in this snipit:


MovieProperties()
{
Name("shell_main");
Inherit("screen_template");
Movie("shell");
0x4d5af670(1);
SegmentList()
{
Segment("shell_main1", 1, 0);
Segment("shell_main2", 1, 0);
}
}

I also changed the hash return value to hex so that it could more easily be compared to the output of 'Hash.exe' in the tools directory.
Any clue what that last property name could be (0x4d5af670)?

Here's the rest:
[spoiler]
MovieProperties()
{
Name("transition_template");
FadeInTime(0);
FadeOutTime(0.200000);
}

MovieProperties()
{
Name("screen_template");
FadeInTime(0.100000);
FadeOutTime(0.500000);
}

MovieProperties()
{
Name("flythrough_template");
FadeInTime(1);
FadeOutTime(1);
}

MovieProperties()
{
Name("shell_main");
Inherit("screen_template");
Movie("shell");
0x4d5af670(1);
SegmentList()
{
Segment("shell_main1", 1, 0);
Segment("shell_main2", 1, 0);
}
}

MovieProperties()
{
Name("shell_sub_left");
Inherit("screen_template");
Movie("shell");
SegmentList()
{
Segment("shell_subrep2", 1, 0);
Segment("shell_subrep1", 1, 0);
Segment("shell_subcis1", 1, 0);
Segment("shell_subcis2", 1, 0);
Segment("shell_subimp1", 1, 0);
Segment("shell_suball1", 1, 0);
Segment("shell_suball2", 1, 0);
Segment("shell_subimp2", 1, 0);
}

}

MovieProperties()
{
Name("cor1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("cor1tran1", 1, 0);
}

}

MovieProperties()
{
Name("dea1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("dea1tran1", 1, 0);
}

}

MovieProperties()
{
Name("fel1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("fel1tran1", 1, 0);
}

}

MovieProperties()
{
Name("hot1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("hot1tran1", 1, 0);
}

}

MovieProperties()
{
Name("kam1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("kam1tran1", 1, 0);
}

}

MovieProperties()
{
Name("kas2tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("kas2tran1", 1, 0);
}

}

MovieProperties()
{
Name("mus1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("mus1tran1", 1, 0);
}

}

MovieProperties()
{
Name("myg1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("myg1tran1", 1, 0);
}

}

MovieProperties()
{
Name("nab1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("nab1tran1", 1, 0);
}

}

MovieProperties()
{
Name("pol1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("pol1tran1", 1, 0);
}

}

MovieProperties()
{
Name("sb1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("sb1tran1", 1, 0);
}

}

MovieProperties()
{
Name("sb2tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("sb2tran1", 1, 0);
}

}

MovieProperties()
{
Name("sb3tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("sb3tran1", 1, 0);
}

}

MovieProperties()
{
Name("sb4tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("sb4tran1", 1, 0);
}

}

MovieProperties()
{
Name("tan1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("tan1tran1", 1, 0);
}

}

MovieProperties()
{
Name("uta1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("uta1tran1", 1, 0);
}

}

MovieProperties()
{
Name("yav1tran1");
Inherit("transition_template");
Movie("shell");
SegmentList()
{
Segment("yav1tran1", 1, 0);
}

}

MovieProperties()
{
Name("crawl1");
Inherit("screen_template");
Movie("shell");
SegmentList()
{
Segment("crawl1", 1, 0);
}

}

MovieProperties()
{
Name("crawl2");
Inherit("screen_template");
Movie("shell");
SegmentList()
{
Segment("crawl2", 1, 0);
}

}

MovieProperties()
{
Name("gcwinall1");
Inherit("transition_template");
Movie("shell");
FadeInTime(1);
FadeOutTime(1);
SegmentList()
{
Segment("gcwinall1", 1, 0);
}

}

MovieProperties()
{
Name("gcwincis1");
Inherit("transition_template");
Movie("shell");
FadeInTime(1);
FadeOutTime(1);
SegmentList()
{
Segment("gcwincis1", 1, 0);
}

}

MovieProperties()
{
Name("gcwinimp1");
Inherit("transition_template");
Movie("shell");
FadeInTime(1);
FadeOutTime(1);
SegmentList()
{
Segment("gcwinimp1", 1, 0);
}

}

MovieProperties()
{
Name("gcwinrep1");
Inherit("transition_template");
Movie("shell");
FadeInTime(1);
FadeOutTime(1);
SegmentList()
{
Segment("gcwinrep1", 1, 0);
}

}

MovieProperties()
{
Name("attractmovie");
Inherit("transition_template");
Movie("shell");
FadeInTime(1);
FadeOutTime(1);
0x4d5af670(1);
SegmentList()
{
Segment("attractcw1", 1, 0);
Segment("attractgcw1", 1, 0);
}

}

MovieProperties()
{
Name("training");
Inherit("screen_template");
Movie("shell");
SegmentList()
{
Segment("training1", 1, 0);
}
}


[/spoiler]
#27
Released Assets / Re: swbf-unmunge - v1.1.1
June 18, 2020, 11:36:06 PM
Sleepkiller,
Could you add the ability for the user to specify an additional file for hash lookup?

I just discovered the ToolsFL\bin\Hash.exe program generates the hashes for the given string.
It would be cool to be able to add to the known hashes so that more stuff gets unmunged well.
#28
SWBF2 Modding / Re: SWBF mvs files discussion
June 18, 2020, 11:15:59 PM
I think it's super cool that you put the hash pairs in those separate files!
I just figured out that the "BF2_Tools\ToolsFl\bin" folder contains a program called "Hash.exe", which gives the hash value for the supplied (string) argument.
So one could add some more known strings if needed. :D

#29
SWBF2 Modding / Re: SWBF mvs files discussion
June 18, 2020, 09:12:57 AM
Quote from: Dark_Phantom on June 17, 2020, 07:07:54 PM
I think you have to play the movie like this:
ifelem_shellscreen_fnStartMovie(this.curItem.movie, 0, nil, nil, movie_left, movie_top, movie_width, movie_height)

I don't have any reference for the second parameter at this time.

Ok...
So the 'ScriptCB_OpenMovie("<movie>.mvs", "")' opens the .mvs file for reading (callers set 'gMovieStream' to the result of this function) and the 'ifelem_shellscreen_fnStartMovie' (or ScriptCB_PlayMovie()) selects an element from the .mvs file to play (with movie name, loop, position, and size arguments).

The .mlst file goes into the munged '.mvs ' file, the .mcfg file is munged into another .lvl file, but I don't see any mapping lookup to get to the right segment of the .mvs file when a movie is played.

I'm not seeing how the name lookup works since the Lua files have the strings in them and the .mvs files don't seem to.
#30
SWBF2 Modding / Re: SWBF mvs files discussion
June 17, 2020, 06:57:19 PM
When playing one of those movies I see code lik:
ScriptCB_OpenMovie("<movie>.mvs", "")

Each of those .mvs files is composed of several other movie files.
I've only seen the function calls specify the .mvs file (with "" as the 2nd argument), can you use the 2nd argument of 'ScriptCB_OpenMovie()' to specify a file within the .mvs file?