wghost81 Posted January 12, 2014 Author Share Posted January 12, 2014 Updated git sources and nexus files to v.2.0. I'm already crazy with all that parsing, so, please, test. Link to comment Share on other sites More sharing options...
wghost81 Posted January 14, 2014 Author Share Posted January 14, 2014 Updated git sources and nexus files to v.2.1: https://github.com/wghost/UPKUtils http://www.nexusmods.com/xcom/mods/448 Modified some new keys behavior and added some keys from TODO list (yes, finally GUIDs!). Added a new tool called FindObjectByOffset. Came in handy while I was analyzing texture info, so I decided to share it too. :smile: Hope this will work well and stable. :smile: I won't be working on a new "smart" features for a while as I have other things to do right now, but I will return to this ASAP. Please, feel free to post any bug reports, corrections and suggestions. :wink: Link to comment Share on other sites More sharing options...
wghost81 Posted January 18, 2014 Author Share Posted January 18, 2014 (edited) Updated again as there was a bug in unsafe guess of default property array type. No other functionality affected. UPD: There still are some glitches, but I'm working on it. :smile: Edited January 18, 2014 by wghost81 Link to comment Share on other sites More sharing options...
FogGene Posted January 19, 2014 Share Posted January 19, 2014 Hi, I was wondering if UPKUtils is the famous UPKModder everybody keeps talking about. I tried searching for it, but I'm afraid I must not be very good at searching. Link to comment Share on other sites More sharing options...
wghost81 Posted January 19, 2014 Author Share Posted January 19, 2014 http://forums.nexusmods.com/index.php?/topic/1223764-r-d-new-modding-tools/ Link to comment Share on other sites More sharing options...
FogGene Posted January 19, 2014 Share Posted January 19, 2014 Awesome. Thanks very much for the link and the program. Link to comment Share on other sites More sharing options...
dubiousintent Posted January 19, 2014 Share Posted January 19, 2014 Another resource for tools (primarily for creating mods, but installers are also listed) is the wiki article 'Modding Tools - XCOM:EU 2012'. -Dubious- Link to comment Share on other sites More sharing options...
wghost81 Posted January 21, 2014 Author Share Posted January 21, 2014 Added a new tool DeserializeAll. It is unstable, but can batch-deserialize map archetypes (like XComWaveSystem), which is helpful in analyzing maps. Type (in windows console) DeserializeAll URB_PierA.upk TheWorld.PersistentLevel To get all TheWorld.PersistentLevel info, like player starting points, alien pods, wave system info, etc. Updated both nexus files and github sources. Link to comment Share on other sites More sharing options...
wghost81 Posted February 19, 2014 Author Share Posted February 19, 2014 Updated PatchUPK for better UPKModded compatibility: 02/19/2014: - C-style comments support added: /* comment */ // comment - FIND_HEX operation now sets temporary scope, which limits the next write operation to FIND_HEX boundaries. This allows to auto-expand object (if AUTO or MOVE specifier is set) to fit in replacement data (specified by MODDED_HEX or AFTER_HEX). Also applies to BEFORE_HEX/AFTER_HEX. - MODDED_FILE is now considered a total replacement for current scope: i.e. it should contain full object data. Is also required now to use Full.Object.Name.ext pattern for file name, as program will auto-set scope, based on file name. - EXPAND_FUNCTION key now sets current scope to specified object. Link to comment Share on other sites More sharing options...
wghost81 Posted March 15, 2014 Author Share Posted March 15, 2014 I'm still trying to avoid adding new objects for the sake of compatibility. So recently, while I was rewriting XGDeployAI.GetPossibleSpawns function, I was forced to make some crazy variable conversions: Original: local XComAlienPod kPod; local array<XComAlienPod> arrPods, arrRemove; local int iPod, iTestPod; Modified: local XComAlienPod kPod; local array<XComAlienPod> arrPods; local TRect arrRemove; local int iPod[14]; local Vector iTestPod; local XComAlienPod A; One good thing: if there is at least one variable, one can have an indefinite numbers of variables of the same type via converting this variable to static array: // convert iPod variable to static array OBJECT=XGDeployAI.GetPossibleSpawns.iPod REL_OFFSET=0x10 BYTE=14 // array size Other good thing: one can convert dynamic array to two independent variables. Dynamic array is a variable itself, plus it has inner variable, which defines its inner object type. Conversion of the array is pretty straightforward, and inner variable needs to be relinked both in export table and in object code: // convert XGDeployAI.GetPossibleSpawns.arrRemove dynamic array to structure EXPORT_ENTRY=XGDeployAI.GetPossibleSpawns.arrRemove OBJIDX=Core.StructProperty // Type OBJECT=XGDeployAI.GetPossibleSpawns.arrRemove REL_OFFSET=20 UNSIGNED=0 // set PropertyFlagsL to zero REL_OFFSET=40 OBJIDX=Engine.Actor.TRect // StructObjRef // rename and relink XGDeployAI.GetPossibleSpawns.arrRemove.arrRemove EXPORT_ENTRY=XGDeployAI.GetPossibleSpawns.arrRemove.arrRemove REL_OFFSET=8 OBJIDX=XGDeployAI.GetPossibleSpawns REL_OFFSET=12 NAMEIDX=A // some random name from name list // link new var to XGDeployAI.GetPossibleSpawns OBJECT=XGDeployAI.GetPossibleSpawns.iTestPod REL_OFFSET=12 OBJIDX=XGDeployAI.GetPossibleSpawns.A // NextRef If one is rewriting several functions at once and has unused local var in some function, that unused var can be relinked to other function in the same manner. Link to comment Share on other sites More sharing options...
Recommended Posts