Dedicated Servers and User Scripts [Solved]

Talk and share anything related to Star Wars Battlefront 2. No maps or mod announcements here. Use Work in Progress forum.

Moderator: Moderators

Post Reply
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Dedicated Servers and User Scripts [Solved]

Post by Locutus »

Hi!
I'm often playing Battlefront II online with some of my friends which is the reason why I'm hosting a dedicated server on my private PC.
But I have a couple of questions concerning this:

1. I know that you can't host maps from the ConvoPack via a dedicated server even though I have no clue why - maybe it's caused by the new units? However, is there a possibility to host these maps by removing or adding sth?

2. I'd really like to use some user_scripts but unfortunately I can't munge anything (yes, I've tried the vista workaround) and I've nearly no understanding of Lua.
But I'd really like to have the following:
- Disable Scout Droids from Magna Guard, Wookie and Imperial Officer
- Disable the zoom function (scope) for *and only for* sniper units
Do you have an idea how I can do that?

What I have installed:
- Win 7 x64
- SWBF II
- Patch 1.1
- Patch 1.3
- ModTools
- Dedicated Server 1.1
- Server Manager 1.10
- Conversion Pack 2.2


Thanks in advance,
Locutus
Last edited by Locutus on Wed May 04, 2011 1:56 pm, edited 1 time in total.
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Re: Dedicated Servers and User Scripts

Post by fasty »

Locutus wrote:1. I know that you can't host maps from the ConvoPack via a dedicated server even though I have no clue why - maybe it's caused by the new units? However, is there a possibility to host these maps by removing or adding sth?
I've run the ConvoPack on a dedi before. You just make an addon folder in your main server file directory.
Locutus wrote:- Disable Scout Droids from Magna Guard, Wookie and Imperial Officer
I've tried this before, couldn't really get it to work. The best you can do is open the recon droids odf file and modify its speed, weapon, etc.
Locutus wrote:-Disable the zoom function (scope) for *and only for* sniper units
Open the sniper rifles odf in your common side, its pretty self explanatory from there.

And if you have no idea what I'm talking about...
forums/viewtopic.php?f=27&t=25396
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Dedicated Servers and User Scripts

Post by Locutus »

Thanks for your quick reply. Unfortunately I have still some problems.
fasty wrote:I've run the ConvoPack on a dedi before. You just make an addon folder in your main server file directory.
Would you mind telling me how you made it work?
I have installed everything on my laptop. After selecting the maps in the server manager (so the maps are placed in the addon folder of course) and starting it, the server loads the new map but the client (ConvoPack is also installed) is somehow skipping them and loading the next original map in the list which results in a lost connection.
I thought this was my bad, so I reinstalled win7 on my desktop PC which has now nothing on it but SWBF II. The funny thing is that the server is now skipping the addon maps and the the client is is loading the mod maps which (of course) also results in a lost connection >.>
All I did was copying the "BF1" folder from my game directory into the addon folder in the server manager.
What am I doing wrong?



fasty wrote:Open the sniper rifles odf in your common side, its pretty self explanatory from there.
Thanks for your information. After reinstalling win7 the munge process is working now! :D
My changes regrettably not.
That's what I did:

1) Make a new map and delete all the lua files for it.
I created a new map (LOB) with conquest checked. Then I deleted every lua file in data_LOB\Common\Scripts. Do have to delete the *.bak files in data_LOB\Common\Scripts\LOB and the addme.lua in data_LOB\addme as well?

2) Go into the assets and get all the luas of all the stock maps you want in your server.
For my test I only copied "myg1c_con.lua"

3) Put them into your new maps common/scripts/abc folder and make changes to them (add the code I mentioned).
Done. But I did not change anything (as it is not needed). The *.bak files are still in this folder.

4) Add the three letter names of the stock maps you're adding in the mission.req in data_abc/common.
Done
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"myg1c_con"
}
}
Then I copied the "com_weap_inf_sniper_rifle.odf" from assets\sides\Common\odf to data_LOB\Common\sides\Common\odf. Is this path correct?
I changed SniperScope = 1 to SniperScope = 0.
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"

[Properties]
ScoreForMedalsType = 4
MedalsTypeToLock = 4

AnimationBank = "rifle"

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "8"
OptimalRange = "64"
MaxRange = "128"
AIUseBubbleCircle = "1"
AIBubbleSizeMultiplier = "0.6"

LockOnRange = "0.0"
LockTime = "0.0"
LockOnAngle = "1.0"

ReticuleInAimingOnly = 1
SniperScope = 0 //<------------Changed this to "0", was "1"
ZoomFirstPerson = 1
ZoomMin = "2.0"
ZoomMax = "8.0"
ZoomRate = "0.0"

YawSpread = "0.0"
PitchSpread = "0.0"

KickStrength = "0.0" // "2.0"

SpreadPerShot = "1.1"
SpreadRecoverRate = "4.8"
SpreadThreshold = "1.6"
SpreadLimit = "6.0"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "8" // 5
ReloadTime = "2.0"
ShotDelay = "0.8" //1.0
TriggerSingle = "1"
MaxPressedTime = "0.0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

//***********************************************
//*********** HUD & CONTROLLER VALUES *********
//***********************************************

ScopeTexture = "weapon_scope3"

MuzzleFlash = "small_muzzle_flash"
FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashLightColor = "255 192 192 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"
5) Munge with common checked then go into your munged maps folder and copy the mission.lvl
Done.

6) Paste it in your servers files C:\Program Files (x86)\LucasArts\Star Wars Battlefront II PC Server\data\_LVL_PC
Done

It seems that I made at least sth. the way I should because Mygeeto appears in the server manager. I can also join and the map is being loaded but I can't spawn, it's permanently counting.
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Re: Dedicated Servers and User Scripts

Post by fasty »

Locutus wrote:Then I copied the "com_weap_inf_sniper_rifle.odf" from assets\sides\Common\odf to data_LOB\Common\sides\Common\odf. Is this path correct?
Uh, no. Copy the entire rep, cis, all, imp and common folders from your assets sides and paste them to data_LOB\Sides. Modify the value to the sniper rifle and munge with sides checked. Copy your munged sides into the server sides folder.

For what you're doing, you should not need a new mission.lvl. If you're not making any changes to the luas, keep the old mission.lvl. Just copy over the sides from your map and keep the old mission.lvl.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Dedicated Servers and User Scripts

Post by Locutus »

Thank you very very much fasty, it's working perfectly now! :D

I also managed to make the ConvoPack running - all I needed to do was to replace the server's common.lvl, shell.lvl and ingame.lvl with the ones from patch 1.3.

I have just one last question^^: Where can I download the ConvoPacks' assets? I mean the props for the Zeroeditor. I was looking around but I couldn't find a link.
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: Dedicated Servers and User Scripts

Post by Fiodis »

Locutus wrote:I have just one last question^^: Where can I download the ConvoPacks' assets? I mean the props for the Zeroeditor. I was looking around but I couldn't find a link.
BF1 Mod Tool assets.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Dedicated Servers and User Scripts

Post by Locutus »

Sry, your keywords didn't help me. I've searched google and the forums but I was unable to find a link. Would you mind posting one?
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Re: Dedicated Servers and User Scripts

Post by [Padawan]Helkaan »

Locutus wrote:Sry, your keywords didn't help me. I've searched google and the forums but I was unable to find a link. Would you mind posting one?
http://www.gametoast.com/forums/viewtop ... 64&t=20167
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Dedicated Servers and User Scripts [SOLVED]

Post by Locutus »

Thank you very much.
I was a bit confused because I thought I'd need some special converted files.
Post Reply