That's where I'm finding the problem now: I want to make a replacement that uses pseudocode just as a proof that the pseudocode functions.
I managed to get it to patch successfully, so it's finding existing objects. Now the game crashes whenever I have the test mod on. Wondering if anyone's got a suggestion.
This is what my test code looks like (excluding the modfile header):
UPK_FILE=XComStrategyGame.upk
OBJECT=XGHeadquartersUI.UpdateHeader:AUTO
[REPLACEMENT_CODE]
//let (strc strLabel strc txtCash inst m_kHeader) (GetResourceLabel 0)
0F 35 <XComGame.XGTacticalScreenMgr.TLabeledText.strLabel> 35 <XGHeadquartersUI.THQHeader.txtCash> 01 <@m_kHeader> 1B <XGScreenMgr.GetResourceLabel> 25 16
0F 35 <XComGame.XGTacticalScreenMgr.TLabeledText.StrValue> 35 <XGHeadquartersUI.THQHeader.txtCash> 01 <@m_kHeader> 1B <XGScreenMgr.ConvertCashToString> 1B <XGScreenMgr.GetResourceLabel> 24 25 16 16
0F 35 <XComGame.XGTacticalScreenMgr.TLabeledText.iState> 35 <XGHeadquartersUI.THQHeader.txtCash> 01 <@m_kHeader> <%i 6>
14 2D 35 <XComGame.XGTacticalScreenMgr.TLabeledText.bNumber> 35 <XGHeadquartersUI.THQHeader.txtCash> 01 <@m_kHeader> 27 04 0B 53
Sorry the comments aren't complete; I started going back through to write them but decided to test it first. It should match up pretty closely to the existing function hex-wise.
Thanks for any help.



Sign In
Create Account
Back to top









