modify map objectif


(jobe314) #1

i would like to know if it’s possible to make map objectif on line or just before loading the map by the host server?
like a game master.
or they are just predefined in map pk3 and cant be modified.
thx


(nUllSkillZ) #2

Actually it’s in the map (bsp) and the script.
So there’s no easy way to do this.

ET-Pro and ET-Pub can load custom map scripts.
But they have to be in a directory on the server before the map is started.
So you could try to create some ET-Pro mapscripts.


(P4nth3r) #3

I don’t know what the f#ck you are talking about ^^
Is it me or???..


(kamikazee) #4

So if I’m right, you want to choose what the objectives for the next map will be when the previous map just ended?
If so, you’d need to make mapscripts for the different types of play as Nullskilz said, and then find a mod or so trough which you can switch map scripts.


(jobe314) #5

yes i want to have an admin who can set objectives before run the map and/or change objectives during the game?
all this in game without touch maps .bsp, .scripts or .pk3 outside the game.


(kamikazee) #6

You will need to make this scripts at least 1 time.
It should be possible though to have a mod which renames the map scripts so only 1 gets selected, I guess.


(jobe314) #7

so i must do all this scripts for each map?
i suppose i can’t use a script with a kind of objectif for my first map, to my second map but i must make a new script for my second map althought it’s the same objectif. that’s right?
i hope my question is not to… :banghead:


(nUllSkillZ) #8

So you are mapping?

You can re-use mapscripts as long as all of the script related entites have identical properties (scriptname, targetname, etc.).
You should copy the script related entities and the script form one map to the next map.


(kamikazee) #9

I think we’re getting confused here.

I’ll try to explain what I was thinking of:

Suppose you’ve got a map. The map mostly has a script to do it’s work.
Now, you could copy this script and modify it so it as slightly different objectives. (Not that easy, but possible with ETPro map scripts)
Now, you can choose which version you play by renaming the original to something with another extension for example, and the modified to how it should be named. You’d then be playing the modified objectives.

Now, what I meant is to give a ref the power to rename these files from inside the game, without manually renaming them. The mod would then do the work, you only need to set up alternative map scripts.

You could of course make something of a dynamic campaign system. But I’ll leave that for the mod maker, the above is just a basic idea.


(carnage) #10

its posible to make a map with entites needed for severl differnt objectives and make them invisible or hidden

then using scripts place them in the right place and set up the objectives acordingly

then by offering alternative scripts depending on what script the server is using the objectives will be different. There will be no way to change the script running half way though the map or without going outside the game

it might be posible to make a external program that scans the console and looks for specific lines by admin players then moves and places pk3 files too and from ETmain on the server to chnage what script the server will run… but the changes wont take effect untill the next time the map runs


(SCDS_reyalP) #11

You should, in theory at least, be able to pass options to mapscripts using cvars.

From http://simland.planetquake.gamespy.com/ldr1_1/


cvar <cvarName> <operation> <value>
    Operation can be any of:
        inc
        abort_if_less_than
        abort_if_greater_than
        abort_if_not_equal
        abort_if_not_equals
        abort_if_equal
        abort_if_equals
        bitset
        bitreset
        abort_if_bitset
        abort_if_not_bitset
        set
        random
        trigger_if_equal
        wait_while_equal

So if you want your admin to be able to modify the objectives, your script would check a particular cvar and change the objectives accordingly.


(carnage) #12

You should, in theory at least, be able to pass options to mapscripts using cvars.

From http://simland.planetquake.gamespy.com/ldr1_1/

Code:

cvar <cvarName> <operation> <value>
Operation can be any of:
inc
abort_if_less_than
abort_if_greater_than
abort_if_not_equal
abort_if_not_equals
abort_if_equal
abort_if_equals
bitset
bitreset
abort_if_bitset
abort_if_not_bitset
set
random
trigger_if_equal
wait_while_equal

So if you want your admin to be able to modify the objectives, your script would check a particular cvar and change the objectives accordingly.

thats pretty interesting… are there any cvar that are unfinished and dont effect the game? could be very useful for a map like kung fu grip where the admin or player can chose if they want to hear the music or not


(jobe314) #13

ok. but the changes will be applied during the current game or map must be reloaded?


(kamikazee) #14

I believe you can set and modify any cvar you want. And I believe Shaderman used a custom cvar for an RTCW-conversion he did.


(Shaderman) #15

AFAIK setting cvars doesn’t work even if there’s a command to do it (something like “cvar test set 1337”). There’s a post about it which I can’t find at the moment.

And I believe Shaderman used a custom cvar for an RTCW-conversion he did.

That’s right. It’s very easy to read and handle cvars (see SCDS_reyalP’s post above for the commands) but I think there are not many useful purposes for existing maps and entities. If you build a map and keep this possibility in mind, it might be a very powerful option though.


(carnage) #16

I believe you can set and modify any cvar you want.

i think he means that any cvar can be set in the game and used in the script not that custom cvars can can set in the script

so say i make a map that uses a new cvar the effect will always be to all players… ei its not posible to do something that will only effect the clinet game since all script effects will be controled server side… but the thing that confises me now! if a player sets a cvar clinet side what will change will it do anyhting or will the players need rcon to set the server cvar’s

ok. but the changes will be applied during the current game or map must be reloaded?

the changes will take place in game or on reload depending on how you set up the script… if you arnage objects on the map by script at startup then the cvar’s will only be checked on startup

if you make the line (i not scripted for a while so ignore my bad code)



spawnsetter
{

short
{
cvar map_spawntimeshort abort_if_not_equal 1
set allied_respawn 5 (i no i no thast not the right code but hey)
wait 500
trigger spawnsetter short
}

long
{
cvar map_spawntimeshort abort_if_equal 1
set allied_respawn 30 (i no i no thast not the right code but hey)
wait 500
trigger spawnsetter long
}

}

trigger spawnsetter short
trigger spawnsetter long


this will look every half second to see if the admin has set the spawn times to long or short… this is one unlikely aplication… i think the main uses would be for map initilaising so admins can chose if they want sertain areas of the map open etc depending on how many players they want on the server)