[ltx] Proper usage of " #include " in this case ?

User avatar
Diegtiarov
Trespasser
Posts: 52
Joined: 12 Nov 2015, 08:34
Contact:

[ltx] Proper usage of " #include " in this case ?

Postby Diegtiarov » 27 Dec 2016, 08:35

Hey,

I want to include a file which is 2 directories back from the edited one.
Edited file directory:

Code: Select all

gamedata\configs\scripts\agroprom\smart\


File I want to include directory:

Code: Select all

gamedata\configs\scripts\


More info:
I want the respawn_idle to be set by 1 file instead of all smart terrain files separately.
I've currently got this:

gamedata\configs\scripts\agroprom\smart\agr_smart_terrain_1_2.ltx

Code: Select all

#include "..\..\respawnrates.ltx"

[smart_terrain]:respawn_med
squad_id = 1
max_population = 3
respawn_params = respawn@agr_smart_terrain_1_2

[respawn@agr_smart_terrain_1_2]
spawn_snork

[spawn_snork]
spawn_squads = simulation_snork
spawn_num = 1


gamedata\configs\scripts\respawnrates.ltx

Code: Select all

[respawn_low]
respawn_idle = 900000

[respawn_med]
respawn_idle = 600000

[respawn_high]
respawn_idle = 300000

[respawn_ultra]
respawn_idle = 120000



It crashes saying it couldn't find respawnrates.ltx.
Any thoughts?

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: [ltx] Proper usage of " #include " in this case ?

Postby Alundaio » 27 Dec 2016, 17:25

It might not be possible, that is something I've never had to do.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

Alexfighter
Scavenger
Posts: 16
Joined: 20 Oct 2015, 10:18

Re: [ltx] Proper usage of " #include " in this case ?

Postby Alexfighter » 28 Dec 2016, 06:39

I don't really know, but in some languages you need to start with a "\" for those reverse paths.

Try this way:
#include "\..\..\respawnrates.ltx"

If it doesn't work in either case, then probably Alundaio will be right and it's not possible.

User avatar
Diegtiarov
Trespasser
Posts: 52
Joined: 12 Nov 2015, 08:34
Contact:

Re: [ltx] Proper usage of " #include " in this case ?

Postby Diegtiarov » 28 Dec 2016, 11:55

I've found an alternative way, instead of 1 file there will be 30 of them for each level so there's no need for impossible backward #include.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests