Jump to content

[Applying Scripts] Reference Alias+Update Script vs Cloak effect


Zzyxzz

Reference&Update Quest vs Cloak Effect  

9 members have voted

  1. 1. What would you prefer to use?

    • Reference&Update Quest
    • Cloak Effect


Recommended Posts

Hello,

 

something i want to discuss the positives and negatives of the two methodes to apply scripts to objects.

 

my thoughts:

 

Reference Alias+Update Script Quest

+ "Less memory" / less bloat

+ Easier to handle/distribute

+ Set a maximum of applied scripts

 

- needs to be reapplied

- inconsistent when refreshed/reapplied

 

Cloak Effect

+ Scripts are attached permamently

 

- more scripts -> more memory used -> larger savegames/savegame bloat

- less convient to handle/apply and keep track

 

 

Really would like to know, what you guys think and if i'm wrong and forgetting something

Link to comment
Share on other sites

Both aren't very 'nice'. 1 uses an Update that is constantely running, and the other slaps scripts on actors that can get orphaned.

 

But the first one gives you more control and allows for checking for errors if the update somehow screws up.

 

Assuming by update, you mean a timer update.

Edited by Lisselli
Link to comment
Share on other sites

Why exactly these 2 ways ? Just curious. There might be other ways like forcing refs into alias using fire and forget magic effect with duration or applying spells with explosions..or something else.

 

Aliases allow to apply packages. If you need packages , this is the only way.

Link to comment
Share on other sites

Spells with explosion? How would that work/how is the spell triggered? Its the same as a cloak or am i wrong?

 

I need a good method to apply a Script to npcs, that also has a huge range.

 

Currently im working with the ref alias+ontimer Update to Refresh the list. It works very well, but the Problem is that i have down times of at least 0.1+ seconds when the Script refreshes.

I need the script to detect npcs that are very far away, max render distance (for on hit events, like sniping). I'm working with 25 ref aliases which should be enough.

 

Does someone have an idea how i can bypass the 0.1 without script downtime?

Link to comment
Share on other sites

There is no method that I know of to avoid the 0.1 timer issue you are describing, since Papyrus is a threaded programming language and everything thus has a certain delay period. More importantly, why is the 0.1 timer even an issue? It is likely more than fast enough to find every NPC in render range before anything of consequence happens.

Link to comment
Share on other sites

I'm thinking about a mechanic that works like that:

 

Aliases Quest - Fills Reference Aliases

Update Quest - Start and Stops the Aliases Quest to refill the reference aliases

AliasTable Quest - Collects/Holds aliases from the Aliases Quest and applies scripts to the aliases.

 

AliasTable Functions:

Gets an ObjectRef from Alias Quest and checks if the ObjectRef already exists in its table, if yes, ignore, else add.

Check if RefAlias/ObjectRef in the AliasTable is still loaded in the memory of the game, if not drop from the table (When player moves through a door and loads a new area or moves away from a area, actors get unloaded. i.e. you dont need to keep Preston Garvey in your table, when you are at diamond city)

Dead objectrefs/actors get automatically cleared from the RefAlias?

 

 

This would mean:

Found ObjectRefs dont get reloaded / scripts dont get reapplied unnecessarily and its still very flexible

Edited by Zzyxzz
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...