• Welcome to AtomicTorch Studio Forums.
 

Events? And some other questions

Started by Periculi, October 13, 2018, 08:24:43 AM

Periculi

Hi there!

Been having a great time diving into modding this game.  A couple of things have me stumped though-

Events that can be bound with actions.Bind - wiki does not seem to have a complete list.  Is it possible to get a complete list of the available events?  Are there some handy ones not exposed in the core scripting?

Items xml all contain an upgrade element.  Is this implemented in some way?

Are there any unused item type codes buried in there?

Are there any other filters that can be used for the shops element in items besides faction_filter?

How does item durability work?  Can the item durability be effected from script?

Is there a way to initiate a topic dialog screen via scripting?  One example might be to have a device that opens up a settings dialog screen. Another example would be to have a scripted NPC ship engage the player with a dialog instead of player initiated F.

Thanks!

ninekorn

#1
Hi Periculi. Sorry for such a late reply. I just restarted scripting in Void Expanse recently and thought i`d have a look at this for you. Following are the actions.bind functions that I have found in the original scripts of the game:


    actions.Bind("OnCalculateInventoryCache", "CalculateInventoryCache");
    actions.Bind("OnCalculateSkillsCache", "CalculateSkillsCache");
    actions.Bind("OnCalculateBuffsCache", "CalculateBuffsCache");
    actions.Bind("OnCalculateShipParameters", "CalculateShipParameters");
    actions.Bind("OnMaximizeShipValues", "MaximizeShipValues");
    actions.Bind("OnUpdateShipParameters", "UpdateShipParams");
    actions.Bind("OnCalculateNpcLeveledCache", "CalculateNpcLeveledCache");
    actions.Bind("OnShipWarps", "OnShipWarpsHandler");
    actions.Bind("OnChatReceive", "OnChatReceive");
    actions.Bind("OnChatCommand", "OnChatCommand");
    actions.Bind("OnCollision", "OnCollisionHandler");
    actions.Bind("OnHit", "OnHitHandler");
    actions.Bind("OnRayHitProjectile", "OnRayHitProjectileHandler");
    actions.Bind("OnProjectileHitShip", "OnProjectileHitShipHandler");
    actions.Bind("OnShipDestroyed", "OnShipDestroyedHandler");
    actions.Bind("OnShipTryToEnterJumpgate", "OnShipTryToEnterJumpgateHandler");
    actions.Bind("OnShipDestroyed", "OnShipDestroyedHandler");
    actions.Bind("OnShipDestroyed", "OnCWaveEmitterDestroyedHandler");
    actions.Bind("OnPlayerEntersGame", "OnPlayerEntersGameHandler");
    actions.Bind("OnPlayerEntersSystem", "OnPlayerEntersSystemHandler");
    actions.Bind("OnStarSystemUpdate", "StarSystemUpdate");
    actions.Bind("OnEnterFrame", "EveryFrame");
    actions.Bind("OnBaseGenerateStock", "GenerateStockHandler");
    actions.Bind("OnInstancedContainerGeneration", "ContainerGenerationFunction");
    actions.Bind("OnDebrisCollided", "OnDebrisCollidedHandler");
    actions.BindToTrigger("onConsumableUsed", "onBallisticAmmoConsumableUsed",
    actions.BindToTrigger("onConsumableUsed", "onRocketAmmoConsumableUsed",
    actions.BindToTrigger("onBulletHit", "OnEMPWpnHit", { projectile_id: "weapon_emp_s1_0" });
    actions.BindToTrigger("onBulletHit", "OnAntihiveHit", {});
    actions.Bind("OnPlayerEntersSystem", "OnPlayerEntersSystemHandler");
    actions.Bind("OnShipAttacked", "OnShipAttackedHandler");
    actions.Bind("OnThankYouMessage", "ThankYouMessageHandler");
    actions.BindToTrigger("onNpcSaved", "NpcSavedHandler");
    actions.BindToTrigger("onNpcKilled", "NpcKilledHandler");
    actions.Bind("OnCargoSold", "CargoSoldHandler");
    actions.Bind("OnHackSuccess", "OnHackSuccessHandler");


But I believe you can also code your custom actions.

I don't have an answer right away for those:
Upgrade elements- i got no idea
Unused item type codes - i think i might have info on that but i gotta search my private messages.
faction-filter- never used it yet.
item durability- i got no clue but i am interested too in that.

And for initiating dialog with Npcs you use the function implemented in patch v2.1.0 here http://forums.atomictorch.com/index.php?topic=1012.0


(player scope)
void player.StartDialogue(string player_name, string npc_tag_unique_id);


That can be initiated also from an Npc script.