Welcome, Guest. Please login or register.
Did you miss your activation email?
September 26, 2017, 12:14:12 pm

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The XR1.1 Client is out now! Download it now!
188539 Posts in 10878 Topics by 17916 Members
Latest Member: Defwish
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Archive
| |-+  Server Forum
| | |-+  Info: Server Triggers
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Go Down Print
Author Topic: Info: Server Triggers  (Read 7983 times)
Crashday
XR Coder
Sr. Member
***
Posts: 350


soundcloud.com/bernhardfritz


View Profile
« Reply #15 on: May 24, 2012, 01:01:54 pm »

ok. but how do I make it so it only affects maps with prefix "xr_" ?
Logged

Groentjuh
Newerth Serveradmin, German Mirror and Webdeveloper
Administrator
Super Hero Member
*****
Posts: 1350


View Profile WWW
« Reply #16 on: May 24, 2012, 02:05:48 pm »

The file server_maps_lookup.cfg has a .template version. This means that the actual .cfg will not be updated by the auto-updater.

If you read the file you will see that it only contains exec lines. At the top of the file it will load 1 main/default mod. Below that are several mods which are loaded based on the map's prefix.

Because the mod files themselves are updated by the auto-updater, you should not change those. You may copy them! So copy /game/mods/prefix/xr.cfg to /game/mods/prefix/custom_XR_Evolution.cfg. Then you may change the contains of /game/mods/prefix/custom_XR_Evolution.cfg.

Once you did that, find the line that exec's the mods/prefix/xr.cfg file in server_maps_lookup.cfg and change that to point to your newly create file; mods/prefix/custom_XR_Evolution.cfg.

What you did is OK, but will be revert with the next XR update. So it's better to do it this way, because that is how the developers intended you to do it!
Logged


Before adding any of my IMs, ask yourself: Can I ask it in a PM?
Before sending me a PM with questions, Search the forums!
Wanna be ref? Post on my Server Forum
Crashday
XR Coder
Sr. Member
***
Posts: 350


soundcloud.com/bernhardfritz


View Profile
« Reply #17 on: May 24, 2012, 05:27:14 pm »

ah now i c! thanks Smiley
Logged

Mohican
Order of the Stick
Former XR Dev
Legendary Member
*****
Posts: 2647



View Profile
« Reply #18 on: July 30, 2012, 02:09:34 pm »

Crashday and I have been working on some little surprises over the past 2 days.

GameScripts via Python
It is now possible to execute GameScript commands with Python.
For example, start "world eden2", spawn a nomad and run anywhere.
Then type this in the console (0 is the index of the first player, which is you!):
 
Code:
python "import server; server.GameScript(0,'!teleport target home')"


Ref commands via Python
Refs will soon be able to access a raft a new commands via python.
For more info,  they will be able to type:

Code:
/ref python help

Server admins who want to give their refs even more commands will be able to edit the file sv_refs.py (in game/python/savage0.zip)
« Last Edit: July 30, 2012, 02:11:34 pm by Mohican » Logged

Mohican
Order of the Stick
Former XR Dev
Legendary Member
*****
Posts: 2647



View Profile
« Reply #19 on: July 30, 2012, 02:51:12 pm »

This is also quite fun to try:

Code:
python "import server; server.GameScript(0,'!die target')"
python "import server; server.GameScript(0,'!revive target 1')"
Logged

Pages: 1 [2] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.03 seconds with 19 queries.