user_scripts on server manager [discussion]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

user_scripts on server manager [discussion]

Post by myers73 »

Does anyone know if a server using server manager to run will run user scripts if put in the correct folder?
Last edited by myers73 on Tue Oct 27, 2009 4:05 pm, edited 3 times in total.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: user_scripts

Post by Aman/Pinguin »

As long as the servermanager uses the 1.3 patch, yes.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [Solved]

Post by myers73 »

how would you make sure that black bag ops uses 1.3, do i need to add in some files?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: user_scripts on server manager

Post by Aman/Pinguin »

Yes, just copy your common.lvl, ingame.lvl and shell.lvl from your game to your servermanager folder.
(Of course you need to have 1.3 installed for your game first.)
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [SOLVED]

Post by myers73 »

k, great, thanks a lot.

so if i run a user_script_# in the server then all users in the server will experiences this, as in a lock vehicle command?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: user_scripts on server manager [SOLVED]

Post by [RDH]Zerted »

Sort of. The code will never run on a the users' machines. It is an important distinction that doesn't really matter to most people...

However, whatever the server says goes. If the server says you didn't enter that vehicle then you didn't enter that vehicle. The lock command will work fine.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [SOLVED]

Post by myers73 »

thanks, so i suppose the lower health i was working on a while back will also, and other stuff like that?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: user_scripts on server manager [SOLVED]

Post by [RDH]Zerted »

Yeah, most things will work.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [SOLVED]

Post by myers73 »

Great, thanks a lot.

a related side note: {_Halls_Of_The_Jedi_Order_} server will be hosting some of the scripts i make if anyone wants to experience them online! So far we have only locked vehicles, but in teh future we will reduce health, and maybe do snipers only! And Zerted is credited for v1.3 and aman/penguin is credited for explaining how to install it on a server.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: user_scripts on server manager [SOLVED]

Post by Fiodis »

Isn't "lock vehicles" already a FC command?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: user_scripts on server manager [SOLVED]

Post by [RDH]Zerted »

It is, but myers73 is making a dedicated server side mod/script. With dedicated servers, no one is able to enter the FakeConsole menu to run commands so it has to be done through custom user scripts. Also, server side mods don't require the connecting users to download anything.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: user_scripts on server manager [SOLVED]

Post by FragMe! »

Sort of related to the dedicated server wins part of this discussion, also found out, that the server map (when run on blackops version not sure about the ingame DS) also decides what happens even if it is changed from what people who join have.
Case in point, on a certain map (remains nameless to protect the innocent or guilty) went in and hexed edited one of the command posts and changed it to team 0 from team 1. The original had one team starting with 2 cps and the other just one so I wanted to see if I could make them both have just one. It worked, if the map is running on the server it is one cp for each team but if I run the map in instant action it runs normally with the 2 to 1 advantage.

Not sure if this was already known or not but I thought I'd relate it anyway.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [SOLVED]

Post by myers73 »

^^this opens up some possibilities...so essentially I could load new objects and more command post...or more likely to happen remove certain objects. Also, would loading custom sides work, or no? Also, i believe changing the heroes would work.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: user_scripts on server manager [discussion]

Post by Aman/Pinguin »

No, you are very limited when using serverscripts. Loading new stuff will either crash the players or they won't see the changes at all.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [discussion]

Post by myers73 »

But i could say, add wampas to each team on every map? and is there a way to check what era is playing, and if a certain one is do something?

EDIT:
[RDH]Zerted wrote:It is, but myers73 is making a dedicated server side mod/script. With dedicated servers, no one is able to enter the FakeConsole menu to run commands so it has to be done through custom user scripts. Also, server side mods don't require the connecting users to download anything.
just saw this, missed it before.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: user_scripts on server manager [discussion]

Post by FragMe! »

I am not sure how much you can do with this, this is not scripting as such it was hexediting the .lvl file. So changing cp ownership for the start of the game and other minor variable (with map creators permission of course) Thing that I think would be good to try would be to try and change the extra unit bleed on death star conquest see if it makes a difference and the Rebels can win once in a while on line :D
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [discussion]

Post by myers73 »

Zerted, is there any special way a custom side should be made to work on a server? Or just copy the .lvl from a map folder in my addon folder. like i could copy the bfx (just an example) sides into the servers files and have a script load them? (with the authors permission of course)
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: user_scripts on server manager [discussion]

Post by [RDH]Zerted »

Yes, no way. The clients won't have the new side data so its useless to try to load them. You can change unit class properties, but you couldn't add in new skins not already loaded by the map. If you distributed the script to the clients then it could work, but then it's just a standard mod.

Anything that uses ReadDataFile, assuming its not reading in a script file, won't work. The clients don't run the server injected code so they won't read that data file. The server will send the client something it doesn't understand and the client will crash.

If a Wampa is already loaded in a mission, then you can have the server add it to another team. Doing this would allow you to force spawn players as Wampas on the other team. However, client's don't run this code so they don't know that the player is allowed to spawn as a Wampa. The clients won't see the Wampa on their unit selection screens (so the server has to force spawn them).

You can normally get the era and game mode of currently playing map (it's possible it won't work on some maps, but I've never seen it not work). See the v1.3 docs on how to do it.

See the FakeConsole commands for things you can do in a custom user script. Anything in there (plus a bit more) that doesn't cause crashes can be done server side without requiring the client to download anything.

You could remove or disable just about anything.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: user_scripts on server manager [discussion]

Post by myers73 »

thanks, that actually makes a lot of sense now that i think about it. any chance of you knowing the code to remove the remove the HUD like free cam does

edit:
also, would using the points LUA work in a user_script?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: user_scripts on server manager [discussion]

Post by [RDH]Zerted »

Sure, you can change the point values if you want. Think of the user scripts as being inserted as the first line of the map's ScriptPostLoad() function.
Post Reply