Jump to content

RCSub

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by RCSub

  1. By overriding the X2Action_lootDropMarker class, I am now able to extend the timer. But there is one problem, by increasing the TimedLootPerMission ini parameter to more than 2, tehre is sometimes more than 1 loot spot (which is fine), but the number on each of them is always the same. The individual loot is still correctly removed when it's timer runs out, but the shown timer is wrong unless the loot times out at the same time.
  2. I also found where the function CreateLootDrop is used and tried overriding there. No luck either. Are there some functions that can't be overridden? or am I doing this the wrong way? Please help
  3. I also found LootDrop.LootExpirationTurnsRemaining = MaxLootExpirationTurns; So I decided to create a new class "XComGameState_Mod_LootDrop", then added [Engine.Engine] +ModClassOverrides=(BaseGameClass="X2Item_DefaultWeapons" , ModClass="X2Item_Mod_Weapon_Slots") +ModClassOverrides=(BaseGameClass="XComGameState_LootDrop", ModClass="XComGameState_Mod_LootDrop") to the XComGame.ini file. My class contains this: class XComGameState_Mod_LootDrop extends XComGameState_LootDrop config(AKBalanceMod); var config int LOOT_TIMER_BASE; var config int LOOT_TIMER_RANDOM_MIN; var config int LOOT_TIMER_RANDOM_MAX; static function CreateLootDrop(XComGameState NewGameState, const out array<XComGameState_Item> LootItems, Lootable LootSource, bool bExpireLoot) { local XComGameState_LootDrop LootDrop; local XComGameState_Item ItemState; local X2EventManager EventManager; local Object ThisObj; local int rnd; `log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); rnd = default.LOOT_TIMER_BASE; if( LootItems.Length > 0 ) { LootDrop = XComGameState_LootDrop(NewGameState.CreateStateObject(class'XComGameState_LootDrop')); NewGameState.AddStateObject(LootDrop); rnd = default.LOOT_TIMER_BASE + RandRange(default.LOOT_TIMER_RANDOM_MIN , default.LOOT_TIMER_RANDOM_MAX); `log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("Random roll:" @ rnd); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("LOOOOOOOT"); `log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); LootDrop.LootExpirationTurnsRemaining = rnd; ThisObj = LootDrop; EventManager = `XEVENTMGR; EventManager.RegisterForEvent(ThisObj, 'PlayerTurnBegun', OnPlayerTurnBegun, ELD_OnStateSubmitted); EventManager.RegisterForEvent(ThisObj, 'LootDropCreated', OnLootDropCreated, ELD_OnStateSubmitted); EventManager.TriggerEvent('LootDropCreated', ThisObj, ThisObj, NewGameState); if( !bExpireLoot ) { ++LootDrop.LootExpirationTurnsRemaining; } LootDrop.TileLocation = LootSource.GetLootLocation(); LootDrop.LastLootOwnerName = LootSource.GetLootingName(); LootDrop.LootSourceID = XComGameState_BaseObject(LootSource).ObjectID; foreach LootItems(ItemState) { LootDrop.LootableItemRefs.AddItem(ItemState.GetReference()); } if( `CHEATMGR == None || !`CHEATMGR.bDisableLootFountain ) { NewGameState.GetContext().PostBuildVisualizationFn.AddItem(LootDrop.VisualizeLootFountain); } } } But I never see the CreateLootDrop function being called when inspecting the console when debugging. Am I overriding the function correctly ? Any advice is welcome :smile:
  4. No, after reinstalling everything, it started working :)
  5. Hello everyone I am currently getting the hang of the XCOM 2 SDK, and I am trying to make a mod, that increases the number of turns you have to collect timed loot. Any idea on how to do this? Best regards RCSub
  6. Hello everyone I seem to have the same problem. My system is Windows 7 64 bit. I have installed both dependensies, but whenever I build a project it just copies around the files, but does not compile anything. I am currently re-installing the SDK, any hints ? Best regards RCSub
×
×
  • Create New...