Log in

View Full Version : EX | Easy server setup



Smoria
09-10-2012, 09:00 PM
Current version 0.2.0

This script will help you to easily configure your server and adds all the necessary functions

Thank Foxtacles, Volumed and remm for help

Features

You can choose your own name, map(just name) and website of the server
Player position and inventory saves into files
Chat names, join, leave and death messages



Commands:

/?(help, commands) - show all commands
/save - manually save player data
/players - show players online
/weather - change game weather
/time - set game time(type "morning" for awesome landscape)
/sex - change player sex
/race - change player race
/pos - show your position data
/a(anim) - play animation
/age - age player
/young - young player


Setup
Just extract all files from the zip into server folder and dont forget to add scripts=ex.dll(ex.so for Unix) in the vaultserver.ini
If you did everything correctly, you can see a script launch message in your server window

Server settings
In the server directory you will find Settings.ini:

name - Name of server
motd - Message of the day
map - Map name(just name, not location)
website - Server site
showposr - Show players online in server rules
serializeworld - Save world upon server shutdown(0 - No, 1 - Only load, 2 - only save, 3 - Save and load)
password - Server password
weather - Server weather(0 - dynamic(smooth) weather, -1 - random weather, id - weather id)
timescale - Сhanges how fast the in-game time progresses
respawn - Respawn delay in milliseconds
console - In-game console


Download (https://smoria.com/api/sync/download.php?file=Smoria/projects/exScript.7z)
Source code (https://github.com/Smoria/vaultmp-exScript)

AHrEJl
09-11-2012, 10:51 PM
nice script )

foxtacles
09-12-2012, 02:25 AM
Nice work. It would be nice if you could include source code, because C++ scripts can be quite harmful / malicious. It's not a requirement, though.

Smoria
09-12-2012, 11:49 AM
Okay, I added the source to this topic

foxtacles
09-12-2012, 10:39 PM
Suggestion:

Instead of UIMessageAll / ChatMessageAll, you can simply use UIMessage / ChatMessage and pass zero as ID parameter
(https://www.vaultmp.com/showwiki.php?title=UIMessage)

Or even nicer for ChatMessage, you can use


Chat << "This message goes to all players";
Player player(playerID);
player << "This message goes to player with playerID";


Also, you don't have to define callbacks you don't use. If you define them, vaultmp will call them. So for performance reasons, you may want to comment them out / delete them.

Smoria
09-13-2012, 06:29 PM
Thanks for suggestion
Version 0.1.3:

New commands
More server settings

Xolitude
09-13-2012, 10:59 PM
Thanks for suggestion
Version 0.1.3:

New commands
More server settings


Love it. Nice job.

Xolitude
09-13-2012, 11:02 PM
One question. What are the ID's of the Race's! :O

foxtacles
09-13-2012, 11:02 PM
You are using SetActorBaseRace and SetActorBaseSex in OnPlayerRequestGame - that won't have any effect. That is because race / sex are tied to the base model used by the player, which is determined only after OnPlayerRequestGame (because that is the return value of it - if you return zero base, vaultmp will automatically choose an unused base model).

Note that all changes to base models are permanent (while the server is running). That is, if some player changes race to X and leaves the server, somebody else joins and gets the base which was used by the previous player, he will have race X.

To avoid this, you can manage base models yourself and for example reserve certain base models for players. This can be done by controlling the return value of OnPlayerRequestGame

If you do this, you should make sure that every player gets a unique base (by returning zero, vaultmp will make sure this is the case). Else several players will share some attributes (i.e. base values, race and sex - everything which has 'Base' in function name indicates that it is a base effect).

Smoria
09-13-2012, 11:56 PM
I had set zero as base in On PlayerRequestGame and move SetActorBaseRace and SetActorBaseSex into OnSpawn and it's work fine
Thanks for help


One question. What are the ID's of the Race's! :O

www.vaultmp.com (https://www.vaultmp.com/showthread.php?1415-Idle-animations-weather-race)

Volumed
09-28-2012, 09:00 PM
tested your script a little late:P, but all I can say is awesome work keep going you are a asset for VaultMP.
Hope to see you on the chat sometimes. :-)

Smoria
10-02-2012, 07:01 PM
Thank you)

LinuXguy
12-26-2012, 11:35 AM
Current version 0.1.41

This script will help you to easily configure your server and adds all the necessary functions

Thank Recyler, Volumed and remm for help

Features

You can choose your own name, map(just name) and website of the server
Player position and inventory saves into files
Chat names, join, leave and death messages



Commands:

/c - show all commands
/save - manually save player data
/players - show players online
/weather - change game weather
/time - set game time(type "morning" for awesome landscape)
/sex - change player sex
/race - change player race


Setup
Just extract all files from the zip into server folder and dont forget to add scripts=ex.dll(ex.so for Unix) in the vaultserver.ini
If you did everything correctly, you can see a script launch message in your server window

Server settings
In the server directory you will find Settings.ini:

name - Name of server
motd - Message of the day
map - Map name(just name, not location)
website - Server site
showposr - Show players online in server rules
password - Server password
weather - Server weather(0 - dynamic weather)
timescale - Сhanges how fast the in-game time progresses
respawn - Respawn delay in milliseconds


Download (https://dl.dropbox.com/u/34302384/vscript.rar)
Download Source (https://dl.dropbox.com/u/34302384/vscript_s.rar)

I'm trying to get a simple server set up in a few hours and I need the example script dlls like right NOW, so do you have a current version of this script or a link to the core vaultmp files that this release uses? thanks :)

Smoria
12-26-2012, 02:40 PM
I'm trying to get a simple server set up in a few hours and I need the example script dlls like right NOW, so do you have a current version of this script or a link to the core vaultmp files that this release uses? thanks :)

The script doesn't use any of vaultmp files. You can download all source code(link in the first message)

Volumed
12-26-2012, 10:55 PM
Waiting for the update of your script I am a proud user. :-)

Opex
12-27-2012, 05:33 AM
Smoria, you're doing a great job, keep it up:)

Smoria
12-27-2012, 11:37 AM
Update
Now compatible with Gary 2.5

Volumed
12-27-2012, 01:23 PM
Thanks for the update Smoria!

Hope you can add this functions:
/anim [ID]
/young
/bimbo
/mutant
/safe

https://www.vaultmp.com/showthread.php?1579-vaultmp-christmas-new-years-eve-script

Volumed
12-29-2012, 09:44 PM
Please recompile for 2.6

Smoria
12-29-2012, 09:59 PM
Please recompile for 2.6
Done)
New version of vaultmp is out so fast)

Smoria
01-05-2013, 10:04 PM
New version:
+World serialization(save containers and items upon server shutdown)
+Command /anim
+Command /pos
+Smooth weather(dynamic)

StarshipGhost
01-05-2013, 11:01 PM
very nice Smoria, keep up the great work. Think it would be easy to enable all radio stations and save what level the player is at, and locations found on the map?

Volumed
01-05-2013, 11:19 PM
Thanks you very much Smoria, reason to host again. :-)

foxtacles
01-05-2013, 11:20 PM
Think it would be easy to enable all radio stations and save what level the player is at, and locations found on the map?

I will have to build functions for that first. What you can save however is attributes:

https://github.com/Foxtacles/vaultmp/blob/master/source/API.h#L261

StarshipGhost
01-06-2013, 02:12 PM
cool Recycler... I wouldn't know how to do that though.

Smoria: is there a way to change the player's age? thought I could but I guess that was another script.

Smoria
01-07-2013, 05:09 PM
Smoria: is there a way to change the player's age? thought I could but I guess that was another script.
I will add an /age command in the next update

StarshipGhost
01-08-2013, 10:31 PM
thanks man. any other stuff you plan on adding with the next update? just curious.

EDIT: I did think of a suggestion that would make it better. Not sure how difficult or how much work it would be but adding a ton more animation commands would be sweet since it adds more realism to the multiplayer. Also, considering there isn't much to do right now in vaultmp in-game it would help.

I am not sure if this should be implemented in vaultmp by Recycler or if it needs to be implemented in the scripts but it would be really great if someone could duplicate all the single-player container items (and random ones) in vaultmp. Does this need to be coded for each container? or can it be duplicated easily? This would greatly improve in-game play at this time. I'd be happy to help in any way with anything I can but I doubt there is much I could do since I don't know any programming. However, if duplicating the single player container items into multiplayer is a matter of copying and pasting many lines of code with minor alterations I could help with that (with instructions).

I can also re-design the website banner here in super high quality if anyone wants me to. I would just need to organize a game session with at least 4 of us where we could clothe and arm ourselves and stand together in a nice area in the wasteland with a nice background, so I could take some screenshots in high quality and do some photoshop work to it. I have NMC's full high-res texture pack and Midhrastic ENB lighting system as well. I would just recommend a different color scheme for the site. The grey is fine but the "slate blue" could be changed to match the new banner to a more appealing color, or if you guys want to leave that color we could do that also and I will match it with the new banner.

Smoria
01-10-2013, 05:00 PM
any other stuff you plan on adding with the next update?

I have not thought about it. I will wait for the next vaultmp update)


I did think of a suggestion that would make it better. Not sure how difficult or how much work it would be but adding a ton more animation commands would be sweet since it adds more realism to the multiplayer. Also, considering there isn't much to do right now in vaultmp in-game it would help.


Type /anim id(0-7 for the pre-defined animations or animation id) to play any animation


I am not sure if this should be implemented in vaultmp by Recycler or if it needs to be implemented in the scripts but it would be really great if someone could duplicate all the single-player container items (and random ones) in vaultmp. Does this need to be coded for each container? or can it be duplicated easily? This would greatly improve in-game play at this time. I'd be happy to help in any way with anything I can but I doubt there is much I could do since I don't know any programming. However, if duplicating the single player container items into multiplayer is a matter of copying and pasting many lines of code with minor alterations I could help with that (with instructions).

The single-player containers can be filled by the mods(i don't know is it synced)


I can also re-design the website banner here in super high quality if anyone wants me to. I would just need to organize a game session with at least 4 of us where we could clothe and arm ourselves and stand together in a nice area in the wasteland with a nice background, so I could take some screenshots in high quality and do some photoshop work to it. I have NMC's full high-res texture pack and Midhrastic ENB lighting system as well. I would just recommend a different color scheme for the site. The grey is fine but the "slate blue" could be changed to match the new banner to a more appealing color, or if you guys want to leave that color we could do that also and I will match it with the new banner.

You need to talk to Recycler about it

StarshipGhost
01-10-2013, 05:29 PM
Oops, that part about the website banner was directed at Recycler, lol...sorry for not clarifying.

For the animations I just meant would be a good idea to add all of the good ones as predefined /anim 0-20 (or however many good unique ones there are) instead of 0-7. Not that important just a suggestion to make it better. It's a pain looking up any id numbers. I think it would be cool also to have people spawn when the joint he server with a random clothing, random melee weapon, and random gun with a little ammo for that gun. I don't know how hard that would be to implement in your script. It kind of sucks that when you die you lose everything after typing all these console commands to get equipment also. I don't know how we could get around that as people could loot your corpse and wouldn't make sense to respawn with items that were looted.

What exactly do you mean by the single player containers can be filled by mods? You mean an .esp mod? Sorry I thought this was done in the scripts or programmed in the actual vaultmp code. I mean when you join a server the map is blank so this stuff must have been taken out but what if Recycler kept items in containers....I thought items were synced. Anyway, great job on the script it's the one to use for now :). I'll offer any help or ideas I can.

Volumed
01-10-2013, 06:38 PM
Oops, that part about the website banner was directed at Recycler, lol...sorry for not clarifying.

For the animations I just meant would be a good idea to add all of the good ones as predefined /anim 0-20 (or however many good unique ones there are) instead of 0-7. Not that important just a suggestion to make it better. It's a pain looking up any id numbers. I think it would be cool also to have people spawn when the joint he server with a random clothing, random melee weapon, and random gun with a little ammo for that gun. I don't know how hard that would be to implement in your script. It kind of sucks that when you die you lose everything after typing all these console commands to get equipment also. I don't know how we could get around that as people could loot your corpse and wouldn't make sense to respawn with items that were looted.

What exactly do you mean by the single player containers can be filled by mods? You mean an .esp mod? Sorry I thought this was done in the scripts or programmed in the actual vaultmp code. I mean when you join a server the map is blank so this stuff must have been taken out but what if Recycler kept items in containers....I thought items were synced. Anyway, great job on the script it's the one to use for now :). I'll offer any help or ideas I can.

There are only 7 animations with a sync, so why do you need more predefined commands?

Yes that works fine, you can make a mod with container with items in it. And take it out in the server. But the items are not sync everyone can take the items out and everyone got the items from there own client. But you can place a empty container fill it up in the server then the items are sync but if the server crash or something the items are gone.

PS. About the screenshot, I made the picture from the header, Uhm, yes it's not high quelity because it was in first instance meant for the Facebook only: https://www.facebook.com/vaultmp I made the website layout later and I did have the same idea like you to get a lot of people together to make a real multiplayer screenshot it's a lot of photoshop now. I tried to get people together to make a screenshot but not enough people are interested from the 563 followers: https://www.moddb.com/mods/vault-tec-multiplayer-mod the new year screenshot was also no success.

foxtacles
01-10-2013, 06:41 PM
There are only 7 animations with a sync, so why do you need more predefined commands?

All idle animations are synced.

Volumed
01-10-2013, 07:19 PM
All idle animations are synced.

And ofcourse Recycler you can tell Smoria how to get them all in the EX script right?(A)

Here something you will like: https://www.newgrounds.com/portal/view/595110

We got a deal?

foxtacles
01-10-2013, 07:20 PM
I've said it multiple times, animation values can be found here:

https://www.vaultmp.com/showthread.php?1415-Idle-animations-weather-race

Volumed
01-10-2013, 09:34 PM
I've said it multiple times, animation values can be found here:

https://www.vaultmp.com/showthread.php?1415-Idle-animations-weather-race

Me Volumed me stupid.

Amen.

Still, Uhm yes, Smoriaaaaaaa.
https://4.bp.blogspot.com/-saYh5WfGHOY/TZLo1uV04PI/AAAAAAAAADE/8w2gLMIqPWE/s1600/puppy_eyes-2.jpg

Xolitude
01-10-2013, 09:36 PM
Awwwwwwwww.

StarshipGhost
01-10-2013, 10:13 PM
haha.... alright thanks again Volumed for the info. let's continue good ideas for Smoria.

Recycler: is it a lot of code to sync single player world container items? sounds like a lot.

EDIT: yeah, Volumed I see it looks much better on the facebook not being stretched. You did a good job for having to photoshop the players in one scene haha, that must have been annoying. And the Vault-Tec logo is not an easy logo to make look "good" even though it is a simple shape.

foxtacles
01-10-2013, 10:36 PM
Recycler: is it a lot of code to sync single player world container items? sounds like a lot.

No, it's not difficult, but I haven't done it yet.

StarshipGhost
01-11-2013, 01:43 AM
No, it's not difficult, but I haven't done it yet.

That's good that it isn't too difficult. I don't think it would be a bad thing if the world items in containers were not synced though. Maybe we should try both? If they were synced that would mean only one person could get something like a Tesla Cannon which if I remember correctly was laying in a ditch on the map and only one in the game. I guess the scripts would handle getting weapons in an additional way though from a trader, script/mod containers, or quests.

foxtacles
01-11-2013, 01:48 AM
All world containers are empty by default.

StarshipGhost
01-11-2013, 02:50 PM
well yeah I know. I think people would stay in the game longer and run around exploring if world containers were turned "on", whether synced or not it doesn't have to be synced in my opinion. it's hard to playtest nobody stays in a game, makes me think they would if they could open containers and find stuff (something to do)? lol...maybe not. I've only seen one other person in a game and they were just standing there idle so I haven't been able to do any testing other than killing him but then he didn't respawn.

Smoria
01-11-2013, 10:15 PM
Ummm... More animations? Ok, i added 103 new animations :D

Use /anim <id(1-103)>
or /anim <Fallout animation id>
or /anim <death/hi/give/take/smoke/heal/sleep/heart/fu>
or /anim <main/chat/warm/wall/weapon/work/tour/cook/ground/sit/bar/wtf> <id>

P.S. Don't use "/anim fu" please

StarshipGhost
01-11-2013, 11:51 PM
awesome man thanks alot!

EDIT: I got a few basic ideas but I am not sure if this is a suggestion for your script or for vaultmp itself, or both. So you can join a game and be a random human race character but what is missing is Ghouls and Raiders (add these for more variety of multiplayer factions)...and a few other ideas

example command:

/faction "raider, ghoul, or human" = changes to random dressed character of chosen faction

then the /sex and /age commands could be used to change gender and age of the chosen faction.

Clothes: Should also spawn with random clothes no matter which faction, gender and age you are (with the possibility of hats and sunglasses too for diversity). Probably not armor though to keep it balanced, and would give incentive for players to search the wastes for some armor.

Weapons: Everyone spawns/respawns with 1 gun and 1 melee weapon, example: say a BB Gun with 100 BB Ammo and a Baseball Bat (or whatever).

Items: spawns/respawns come equipped with about 5 Stimpacks, 3 Nuka-Cola's, and 3 Purified or Dirty Waters to quench your thirst on a hot wasteland day. Some chems like 1 Psycho and 1 Buffout.

Basically this would feel more like we just came out of the vault with the bare essentials.

Smoria
03-02-2013, 04:06 PM
New version for gary 2.7)

*Shorter versions of commands
/a(anim)
/?(help, commands)

+New commands
/age
/young

+New world serialization w/ save/load/save and load options, items/containers ownership and lock status

+Enabling/disabling in-game console

+Customizable chat colors

+Some things that i forgot

foxtacles
03-02-2013, 08:28 PM
Nice :)

I think you have a potential buffer overflow in the /pos command. On your public test server, using /pos seems to crash the server - or at least, I'm always losing connection.

(you should always use snprintf instead of sprintf)

Smoria
03-02-2013, 09:52 PM
Oh thanks) This is so many colors in /pos command)

zant91
03-19-2013, 12:41 PM
Hi Smoria, really nice script, very usefull, but I noticed when I enable the script, my server crash randomly, if I disable it, it's stable, but I can't save my data :), can you do something or do you know what can be causing this crash on your script?

Snoopdogma
07-16-2013, 04:45 PM
Anybody help me with this :(
I dowload the main file, there are 4 little file in there , I extract all of them into the server directory , then I change the scripts=ex.dll in my .ini but the server didn't save anything when I logout . I don't really understand how this work :( and btw I am new for these mod
Please help me :( and I didn't download the Spurce because I don't know anything about it so I won't touch it :(

Volumed
07-16-2013, 04:49 PM
Anybody help me with this :(
I dowload the main file, there are 4 little file in there , I extract all of them into the server directory , then I change the scripts=ex.dll in my .ini but the server didn't save anything when I logout . I don't really understand how this work :( and btw I am new for these mod
Please help me :( and I didn't download the Spurce because I don't know anything about it so I won't touch it :(

This is how it should look like

[scripts]
scripts=ex.dll

ArathHunter
11-11-2013, 11:19 AM
Would be nice to have this updated for 2.9,

namine207
12-08-2013, 08:52 PM
I 100% Agree with ArathHunter. It crashes the server when I try to load it. XD Does anyone know if there's anything like this for 2.9?

Chrono8965
06-14-2014, 04:03 PM
We need an update for this script

DiShipeR
11-26-2014, 02:08 PM
Yes, would not hurt to upgrade to the new version of the multiplayer. RU(Да, не помешало бы обновление под новую версию мультиплеера.)

Rockoria
11-27-2014, 01:29 PM
Too bad this is dead, an update would be cool.

Smoria
01-15-2015, 04:06 PM
Sorry for the late update to newest server version...
Currently script is Windows only :/

New version:
+Logging
*Fixed some crashes

Now you must include default scripts(pickup.dll,ilview.dll,cview.dll) to scripts list in your vaultserver.ini

ArathHunter
02-27-2015, 10:27 AM
Oh wow... I'm very pleasently surprised! Can't wait to try this out! ...Maybe tomorrow, hopefully I can remember how to do... anything, it's been so long since I touched any of this!

Thanks Smoria!

Edit: Okay, tried it out. The menu is gone which is nice, but Tab is still disabled (F1-F4 still works if you give yourself a Pipboy through console and equip through console, but a PDA mod is messing with that on my end), Esc and can't open containers (or sit), Weapons have infinite ammo, and I didn't test this bit out very well, but I think I didn't take any damage from drops (radiation and kill command still killed me though), didn't/couldn't test being shot at yet to see if I'm damaged. Master Server seems to have been turned off, so I'm not sure but, would it be better to roll back a release to have something that works better? I remember the last one I was able to shoot, injure and kill another player, I even got disarmed once I think.

Edit: okay, forgot to add those other .dll's before, but I didn't see any changes... or maybe I entered them wrong?
I did it as
[scripts]
scripts=ex.dll
pickup.dll
ilview.dll
cview.dll

Should I do it another way? I'll try with Commas next ( scripts=ex.dll, pickup.dll, ilview.dll, cview.dll)
Edit: Didn't work. It also didn't enable ex.dll entering it that way.
Though I'm curious at what these do exactly.

Smoria
06-29-2015, 06:31 PM
ArathHunter, sorry for the late answer. I didn't saw topic updates after You edited your post.

Dll's must be comma seperated without space after comma. Also make sure that all dll's are located in the same folder as "vaultserver.exe". You can see if script is enabled or not in server console.