Jump to content

.ini spawn clarification


Avenger

Recommended Posts

(Everything written is unsure, slightly more than speculation, though)

 

If you got infinite spawns, then it isn't spec_area's problem. This would just restrict search to the specified area, if there is no matching creature in the area, then it would spawn (some). I guess, you would still get infinite spawns without spec_area?

Point select types:

R means, the selected spawnpoint is chosen randomly from a list of points.

I means, the selected spawnpoint cycles through the list of points.

S is a dead feature.

E point is explicit (not sure what this means, but it likely comes from a variable)

Link to comment
If you got infinite spawns, then it isn't spec_area's problem. This would just restrict search to the specified area, if there is no matching creature in the area, then it would spawn (some). I guess, you would still get infinite spawns without spec_area?

no, I've tested everything mentioned in this post with the INI file mentioned in these repro steps. Infinite spawns starts only after using spec_area with these values. Without it the INI code works fine.

 

Point select types:

R means, the selected spawnpoint is chosen randomly from a list of points.

I means, the selected spawnpoint cycles through the list of points.

S is a dead feature.

E point is explicit (not sure what this means, but it likely comes from a variable)

thanks, I've just tested it with spawn_point = [1200.600],[1300.700],[1400.800]

point_select = R //works as described (spawn/respawn in randomly picked spawn_point)
point_select = I //seems to be broken (there is no spawn at all instead of expected cycle through available spawn points)
point_select = S //initial spawn always at the first spawn point. Following re-spawns always at the second spawn point. Third spawn point is ignored
point_select = E //unknown (no spawn at all)

Also checked the 'save_selected_point' and 'save_selected_facing' with this:

spawn_point = [1200.600:1],[1300.700:5],[1400.800:9]
point_select = R
save_selected_point = 1
save_selected_facing = 1

Nothing is changed in the way it spawns (still the point is selected randomly on each respawn). I suspected that 'save_selected_point' would make the 'point_select' work randomly only once and later use the same (already chosen) point for next spawns, but it's not the case. Saving facing also doesn't seems to change anything.

 

edit: just in case those save_* arguments are meant to be used with global version of the 'spawn_point' I've tried replacing it with 'spawn_point_global' - this results in no spawn at all, so that one doesn't seems to be implemented.

Link to comment

'E' likely doesn't work, because you need some more attributes that set up the 'explicit' point.

You will need 'spawn_point_global' - that names a variable whose content you can create by SaveLocation (or probably with those save_* attributes), i guess.

 

With a little more digging, i found that the rectangle region type is surely unsupported in current EE.

The point type is simply a circle type with radius default to 1.

 

Try to find some examples for these in the vanilla games. If they work there, move on to the EE and see if they work there.

If you don't find anything in the vanilla games, well, chances are likely it never worked correctly, and since we got no working reference or specification, it is unlikely i can make it work (at an acceptable cost).

If you find something that works in vanilla but doesn't work in the EE, i'm willing to fix it.

 

 

For the sequential type, try adding this: inc_spawn_point_index

Hopefully, that will make the 'S' point really cycle through the indices.

This one also uses 'point_select_var' (which is a variable name specification) to hold the index variable (so don't forget to set it)

Link to comment
For the sequential type, try adding this: inc_spawn_point_index

Hopefully, that will make the 'S' point really cycle through the indices.

This one also uses 'point_select_var' (which is a variable name specification) to hold the index variable (so don't forget to set it)

 

Here's the test INI code:

[spawn_main]
events=EVENT1

[EVENT1]
critters=TheTest
interval=10

[TheTest]
spec = AASIM
cre_file = AASIM
spawn_point = [1200.600:1],[1300.700:5],[1400.800:9],[1500.900:14]
ignore_can_see = 1
point_select = s
point_select_var = var_point
inc_spawn_point_index = 1

same results (initial spawn always at the first spawn point. Following re-spawns always at the second spawn point.)

Also tried it with inc_spawn_point_index = 2 and with no value argument at all. Finished testing with adding

save_selected_point = var_point
save_selected_facing = var_face

at the end but it still doesn't work.

 

Then I tested point_select = s in PST:EE because it's used there in some INIs. I can confirm that it’s broken there too - tested in AR0901, where horse.cre is supposed to spawn sequentially but follows the same pattern as described.

 

Try to find some examples for these in the vanilla games. If they work there, move on to the EE and see if they work there.

If you don't find anything in the vanilla games, well, chances are likely it never worked correctly, and since we got no working reference or specification, it is unlikely i can make it work (at an acceptable cost).

If you find something that works in vanilla but doesn't work in the EE, i'm willing to fix it.

In old PST AR1100.INI following arguments are used:

- point_select = s

- point_select = e

- spawn_point_global = GLOBAL::Pack_Spawn_Point

- save_selected_point = GLOBAL::Pack_Spawn_Point

 

I'd like to test if any of them really works there (not much success when I've tried to recreate that INI code in EE games).

 

btw. GLOBAL::, MYAREA::, nameOfTheArea:: scopes works just fine with spec_var in EE games.

Link to comment

ok, I tested the above mentioned stuff in both vanilla PST and PST:EE. I've remade the AR1100.INI code in AR0202.INI (starting area). Here is the INI used for testing:

[nameless]

[namelessvar]
Mortuary_Alert=2
Mortuary_Alert_1=1
Mortuary_Alert_2=1
Mortuary_Alert_3=1

[locals]

[spawn_main]
events=repetitive

[repetitive]
critters=pack1_leader,pack1
interval=1

[pack1_leader]
spec        = 1100lead1
cre_file    = 0201GD1
script_name    = 1100lead1
spawn_point    = [1000.2400:1][1100.2400:3][1200.2400:5][1300.2400:7][1400.2400:9][1500.2400:11]
point_select    = s
save_selected_point    = GLOBAL::Pack_Spawn_Point
ignore_can_see = 1

[pack1]
spec        = 1100foll1
spec_qty    = 3
cre_file    = zf1096
script_name    = 1100foll1
spawn_point_global    = GLOBAL::Pack_Spawn_Point
point_select    = e
facing        = 8
ignore_can_see = 1

conclusions:

1. point_select = s is equally broken in vanilla engine (initially first spawn point, then next one infinitely, rest are ignored). Considering PST:EE also uses point_select = s in few places I recommend changing it to point_select = r, if it's not going to be fixed

2. point_select = e works as follows in old PST:

- [pack1_leader] spawns and saves his spawn point into Pack_Spawn_Point global via 'save_selected_point'

- [pack1] spawns with point_select = e near [pack1_leader] using spawn point data saved within 'spawn_point_global'

 

So everything works as expected.

The only oddity is that you need to actually set 'spec_qty' to above 1 in order to make the [pack1] spawn point active. For some reason spec_qty = 3 spawns 2 creatures, spec_qty = 2 only 1 and spec_qty = 1 don't spawn anything. Just a thing to remember when coding this stuff since it's not really a problem. (edit: the problem with spec_qty was due to me changing conditions on the on-going game. It works fine after starting new game)

 

The same code pasted into PST:EE is broken - [pack1] never spawns. Group spawning in the same (ranomly chosen) point as group leader sounds like a usefull feature, so fixing this one may be a good idea. Should I post it as bug on redmine?

 

edit: unfortunately 'spec_area' is not used in IWD+HoW / IWD2 / PST, so there's no code that could be used as a reference for testing. I wasn't able to make it work in EE no matter what I try (always infinite spawns).

'find_safest_point' is used in many places in PST but I'm not sure how to test if it does something.

Link to comment

updated list of known INI options:

//Common
[spawn_main]            // Section of the file where 'enter' and 'events' type spawns are assigned
enter                   // List of all 'enter' type spawns (spawns that should happen when you enter the area)
events                  // List of all 'events' type spawns (repeating spawns)
critters                // List of all spawn point names associated with 'events' or 'enter' type spawns
interval                // How much time should pass before engine re-checks conditions for another spawn (measured in game ticks)
spec_var                // If variable referenced here is not set, then the spawn won't occur (variable scope can be set via prefix - GLOBAL:: / MYAREA:: / areaFileName:
spec                    // If there is a creature fulfilling the 'spec', then the spawn won't occur. It should be set either to the CRE script name (DV) or ID values of the creature: BG:EE/IWD:EE [EA.GENERAL.RACE.CLASS.SPECIFIC.GENDER.ALIGN], PST/PST:EE [EA.GENERAL.RACE.CLASS.SPECIFIC.GENDER.ALIGN.FACTION.TEAM], IWD2 [EA.GENERAL.RACE.SUBRACE.SPECIFIC.GENDER.ALIGNMNT.CLASS.CLASS20.CLASSMSK]
spec_qty                // How many creatures will be spawned (spawn point will re-spawn death creature even if other spawned creatures are still alive)
create_qty              // How many creatures will be spawned (spawn point will re-spawn creatures only if all of them are death)
cre_file                // Filename of the CRE that should be spawned
script_name             // Overwrites spawned CRE script name (DV)
ai_ea                   // Overwrites spawned CRE ea value
ai_general              // Overwrites spawned CRE general value
ai_race                 // Overwrites spawned CRE race value
ai_class                // Overwrites spawned CRE class value
ai_gender               // Overwrites spawned CRE gender value
ai_specifics            // Overwrites spawned CRE specifics value
ai_alignment            // Overwrites spawned CRE alignment value
script_override         // Overwrites spawned CRE override script
script_area             // Overwrites spawned CRE area script (not remembered after game load)
script_specifics        // Overwrites spawned CRE specifics script
script_class            // Overwrites spawned CRE class script
script_race             // Overwrites spawned CRE race script
script_general          // Overwrites spawned CRE general script
script_default          // Overwrites spawned CRE default script
dialog                  // Overwrites spawned CRE dialog file
spawn_point             // Spawn point coordinates eg. [1200.600:14] (the last argument is facing - will be random if omitted, several spawn point coordinates can be separated with commas)
point_select            // Point select types: 'R' = spawn/respawn in randomly picked spawn_point; 'S' = initial spawn at the first spawn_point. Re-spawns always at the second spawn point; 'E' = spawn using preset global data [works only in PST, broken in EE]; 'I' = unknown
facing                  // Facing after spawn (in PST this entry is ignored if 'point_select' is not set; in EE games it doesn't seems to be used at all)
ignore_can_see          // If set to 1 spawn point will be active even if you're in a view of a spawn point
find_safest_point       // If set to 1 prioritizes spawn_point located in an invisible spot (outside of viewport or visibility). So if you want a spawn to happen, but preferably inside the fog of war, use this.
do_not_spawn            // Disables spawn point (useless considering there is no way to enable it in-game)

//PST:EE / PST specific
[nameless]              // Section of the file with 'destare', 'point', 'state', 'partyarea', 'partypoint'
destare                 // Area at which The Nameless One will spawn after death
point                   // Coordinates at which The Nameless One will spawn after death
state                   // Animation that The Nameless One will use after death re-spawning (35 - already standing, 36 - getting up)
partyarea               // Area at which other party members spawn after The Nameless One death
partypoint              // Coordinates at which other party members spawn after The Nameless One death
disable_renderer        // 0 makes spawned CRE not renderable (can be changed in-game via SetRenderable action)
ai_faction              // Overwrites spawned CRE faction value
ai_team                 // Overwrites spawned CRE team value
good_mod                // Modifies GOOD variable increment value on death (can be negative, modifies 0x2b8 offset [PST] by specified amount, sets BIT10 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
law_mod                 // Modifies LAW variable increment value on death (can be negative, modifies 0x2b9 offset [PST] by specified amount, sets BIT11 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
lady_mod                // Modifies LADY variable increment value on death (can be negative, modifies 0x2ba offset [PST] by specified amount, sets BIT12 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
murder_mod              // Modifies MURDER variable increment value on death (can be negative, modifies 0x2bb offset [PST] by specified amount, sets BIT13 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_scriptname        // If set to 1 enables script name tracking (sets BIT4 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_faction           // If set to 1 enables faction death tracking (sets BIT7 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_team              // If set to 1 enables team death tracking (sets BIT8 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
auto_buddy              // If set to 1 enables call for help (sets BIT15 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
detail_level            // High/Medium/Low - disables spawning if 'torment.ini/program_options/detail_level' is set to lower level then specified here [PST only]

//Confirmed working in original PST, broken in EE games
save_selected_point     // Saves current 'spawn_point' data into variable of your choice
spawn_point_global      // Spawn using data retrieved from global set via 'save_selected_point' instead of 'spawn_point' (also requires setting point_select = e)

//Works only in IWD2
exit                    // List of all 'exit' type spawns (spawns that should happen when you exit the area)
spec_var_operation      // Changes the way 'spec_var' checks if spawn point should be active. Available options for variable check: greater_than / less_than / equal_to / not_equal_to
spec_var_value          // Value used by 'spec_var_operation' and 'spec_var_inc'
spec_var_inc            // Increment global assigned as 'spec_var' when killed (can be negative)
area_diff_1             // 0 disables spawning when area difficulity = 1
area_diff_2             // 0 disables spawning when area difficulity = 2
area_diff_3             // 0 disables spawning when area difficulity = 3
script_special_1        // IWD2 equivalent for 'script_area' [unlike BG/IWD engines this script slot in IWD2 is remembered after re-loading]
script_team             // IWD2 equivalent for 'script_specifics'
script_special_2        // IWD2 equivalent for 'script_class'
script_combat           // IWD2 equivalent for 'script_race'
script_special_3        // IWD2 equivalent for 'script_general'
script_movement         // IWD2 equivalent for 'script_default'

//Common in all games but unknown or broken
[locals]                // Section of the file left blank in all example files.
spec_area               // Doesn't seem to work in EE games and PST, but supposed to limit respawn condition to a portion of the area (point/circle/rectangular area) http://gibberlings3.net/forums/index.php?showtopic=27181#entry256216
control_var
point_select_var
save_selected_facing
spawn_facing_global
inc_spawn_point_index
hold_selected_point_key
check_by_view_port      // Found in many sample files but with incorrect 'check_view_port' name, so it never really had any visible effect in game, no idea how to test it
check_crowd
spawn_time_of_day
time_of_day

//Present in PST / PST:EE, unknown
[namelessvar]

those 'spec_var_operation', 'spec_var_value' and 'spec_var_inc' options, available only in IWD2, are pretty great. They allow to implement interesting spawns without need to use external scripts in order to contol everything. If there's going to be some work done in EE games regarding INI files, implementing all 3 of them would be a great addition, imo.

 

edit: added 'find_safest_point' to the known list.

edit2: changes:

- details added for good_mod, law_mod, lady_mod, murder_mod

- death_scriptname, death_faction, death_team, auto_buddy, detail_level, state moved to known section.

- corrected destare, point description

Link to comment

thanks, Avenger. Previous post has been updated. Also tested following entries and added them to the known list / extended already posted info:

good_mod                // Modifies GOOD variable increment value on death (can be negative, modifies 0x2b8 offset [PST] by specified amount, sets BIT10 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
law_mod                 // Modifies LAW variable increment value on death (can be negative, modifies 0x2b9 offset [PST] by specified amount, sets BIT11 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
lady_mod                // Modifies LADY variable increment value on death (can be negative, modifies 0x2ba offset [PST] by specified amount, sets BIT12 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
murder_mod              // Modifies MURDER variable increment value on death (can be negative, modifies 0x2bb offset [PST] by specified amount, sets BIT13 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_scriptname        // If set to 1 enables script name tracking (sets BIT4 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_faction           // If set to 1 enables faction death tracking (sets BIT7 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
death_team              // If set to 1 enables team death tracking (sets BIT8 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
auto_buddy              // If set to 1 enables call for help (sets BIT15 in 0x2e0 [PST] / 0x96 [PST:EE] offset)
detail_level            // High/Medium/Low - disables spawning if 'torment.ini/program_options/detail_level' is set to lower level then specified here [PST only]
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...