Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

"Save & Load" Variable Sets

Hail to you my brethren,

I recalled seeing this suggestion before, but I don't recall who said it or where it was said, but when I saw it I thought, "What a fantastic idea!" How feasible is it to Save and Load variable sets like we do for Scripts and Spell selections, like a template of various variables that you need to have included on creatures, placeables, areas, WPs, etc?

Thank you,
G D L

SherincalldTdDerpCityshadguyMermut

Comments

  • SherincallSherincall Member Posts: 387
  • raz651raz651 Member Posts: 175
    Ketha said:

    Could you make variables save and load like script sets? Would love this for area variables especially.

    https://forums.beamdog.com/discussion/comment/977427#Comment_977427

  • virusmanvirusman Member, Developer Posts: 169
    What are you using these variables for?

  • Grizzled_DwarflordGrizzled_Dwarflord Member Posts: 168
    Anything and everything on PWs: treasure containers to recall info on whether it was trapped, locked, what was inside it, and what treasure script was used in the OnOpen event; zombies, to remember their dead state, their placeable corpse on spawn, their create resref on spawn, their detect radius to spawn, are they face up or face down; random trap generators for particular areas, and on and on and on.

  • virusmanvirusman Member, Developer Posts: 169
    These are mostly set in-game though, right? What do you set in Toolset?

  • Grizzled_DwarflordGrizzled_Dwarflord Member Posts: 168
    edited June 2018
    No, they are set through the toolset. These things are typically in the Advanced properties of a Waypoint, Creature, Placeable, etc. However, each variable must be set individually. For instance, here is a screenshot of the variables for spawning a creature via waypoint. Keep in mind that some of these we place in the palette for ease of reference and use, but others not so much, easpecially when it comes to treasure and AI variables on creatures:


    dTd
  • dTddTd Member Posts: 182
    Best idea I've heard in a while. I use many variable sets for custom ai, for commoners to wander around towns interactively, for spawned creatures to animate, for combat types such as archers and fastbuffers, for NPCs who sit in chairs. With one set of carefully crafted scripts all ai types can be set using variables on the creatures in the palette, no need for 25 on_spawn scripts. With variable sets being able to be saved, you can easily crank out different creatures utilizing the same ai or behavior modifications without endless typing with the chance of typos and errors.

  • ShadowMShadowM Member Posts: 571
    You can just run you AI through list of all AI with just one variable to set the AI to use, so only one script. This will become a big script, but it possible. This is still a good idea, but you switch to save files I guess similar to load save script tempplates.

  • dTddTd Member Posts: 182
    The default on spawn script contains most of the switches in it already, all you need do is wrap them with if for ints and voila, now you have one script that can handle all creatures. Variable templates don't load up your module with scripts, they aren't included in the build :) On the other hand, without variable templates, we now have to either keep many pre-made prefab creatures, placeables and items in the palette to copy or chance making mistakes while typing these long variable lists in. Really this would be such a time saver and sanity saver for me.

  • ShadowMShadowM Member Posts: 571
    edited June 2018
    Comes out even, click creature put integer AI 1 done or Click copy creature click load AI variables set. click done. Great for non creatures though like waypoints/placables.

  • dTddTd Member Posts: 182
    Yes, that works for just creature ai, what about those spawn variables listed above? Frankly, with your suggestion, that script will be huge since you have to separate out if you want them ranged and animated immobile, or animated close range and ranged or ranged fastbuff and wander or any of a hundred more combinations. With multiple variables on the creature the default on spawn script can be slightly edited and used.

  • ShadowMShadowM Member Posts: 571
    Yes the creature AI would be big but it would not be cumbersome, like I said though it be great for waypoints and placables like his example. I'm with you guys and think it be nice if they added it, I just saying there are options. Have any you tried to get it on the trello?

    dTd
  • KethaKetha Member Posts: 10
    Here is a partial list of how I use variables on an area...... I set these on EVERY area my module has.

    nCanBurn
    nHoly
    nNoFly
    nNoHorse
    nNoPolymorph
    nNoPort
    nNoSummons
    nQuests
    nUnderwater
    nSecrets
    nWordQuest
    nTreasure
    nShowMap


    then the OnEnter encompasses this variable set with various tricky stuff

  • dunahandunahan Member Posts: 122
    edited July 2018
    As above, you could write a include with a void for all your vars to set, and const vars within this include for every area. Could be done by if/else or if you use numbers within the resref for your areas (like area001) by switch/case.
    This could be started from module onload.

    But, if we could do it simpler, it would be awesome!

Sign In or Register to comment.