Author Topic: Events? And some other questions  (Read 2460 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
Events? And some other questions
« on: October 13, 2018, 08:24:43 am »
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.



  • Full Member
  • ***
  • Posts: 231
    • View Profile
Re: Events? And some other questions
« Reply #1 on: November 11, 2018, 04:46:52 pm »
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:

Code: [Select]
    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

Code: [Select]
(player scope)
void player.StartDialogue(string player_name, string npc_tag_unique_id);

That can be initiated also from an Npc script.
« Last Edit: November 11, 2018, 04:51:12 pm by ninekorn »