[Question] Usage of "SetForcedMods" In Server?

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by nouseforname » 07 Sep 2008 15:09

i am somwhow too stupid to get it...
i wanna disable SetForcedMods in a running server by using command line

it should be something like in xaseco

/admin call SetForcedMods ........array false

can somebody tell me how to disable?
i know i just could restart the whole server, but i wanna understand this command

in the plugin which enable this the line is:

$aseco->addCall('SetForcedMods', array(true, array(array('Env'=>'Stadium', 'Url'=>$mods[$idx]))));

thanks
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Xymph » 07 Sep 2008 16:23

nouseforname wrote:i wanna disable SetForcedMods in a running server by using command line

it should be something like in xaseco

/admin call SetForcedMods ........array false

can somebody tell me how to disable?
From the v1.02 release notes:
methods that require an array or struct as parameter are not supported
nouseforname wrote:i know i just could restart the whole server, but i wanna understand this command

in the plugin which enable this the line is:

$aseco->addCall('SetForcedMods', array(true, array(array('Env'=>'Stadium', 'Url'=>$mods[$idx]))));
An empty array for the second parameter probably disables it, so: $aseco->addCall('SetForcedMods', array(true, array());
But you can't do that from a command line.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by nouseforname » 07 Sep 2008 16:35

Xymph wrote: From the v1.02 release notes:
methods that require an array or struct as parameter are not supported
sry, didn't remember that. but that explanes why i can't do it^^
An empty array for the second parameter probably disables it, so: $aseco->addCall('SetForcedMods', array(true, array());
But you can't do that from a command line.
thanks.
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

Yorkshire
smooth traffic navigator
smooth traffic navigator
Posts: 192
Joined: 21 May 2008 08:39
Owned TM-games: TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Yorkshire » 21 Sep 2008 06:36

jamie_macdonald wrote:
Yorkshire wrote:Forget that, sorted it :)

Regards,

Nick.
Not fancy posting your code for others?? :roflol:

Code: Select all

<?php
Aseco::registerEvent('onEndRace', 'forceModEndRace');
function forceModEndRace($aseco, $command){
    $modsStadium = array(
	'http://www.fileden.com/45645645645/StadiumLoadENG.zip'
	);
    $modsIsland = array(
	'http://www.fileden.com/45645645645/IslandLoadENG.zip'
	);
    $modsSpeed = array(
	'http://www.fileden.com/45645645645/SpeedLoadENG.zip'
	);
    $modsRally = array(
	'http://www.fileden.com/45645645645/RallyLoadENG.zip'
	);
    $modsBay = array(
	'http://www.fileden.com/45645645645/BayLoadENG.zip'
	);
    $modsCoast = array(
	'http://www.fileden.com/45645645645/CoastLoadENG.zip'
	);
    $modsAlpine = array(
	'http://www.fileden.com/45645645645/AlpineLoadENG.zip'
	);
    $idxStadium = rand(0, count($modsStadium)-1);
    $idxIsland = rand(0, count($modsIsland)-1);
    $idxSpeed = rand(0, count($modsSpeed)-1);
    $idxRally = rand(0, count($modsRally)-1);
    $idxBay = rand(0, count($modsBay)-1);
    $idxCoast = rand(0, count($modsCoast)-1);
    $idxAlpine = rand(0, count($modsAlpine)-1);
	$modCalls = array(
	array('Env'=>'Stadium', 'Url'=>$modsStadium[$idxStadium]),
	array('Env'=>'Island', 'Url'=>$modsIsland[$idxIsland]),
	array('Env'=>'Speed', 'Url'=>$modsSpeed[$idxSpeed]),
	array('Env'=>'Rally', 'Url'=>$modsRally[$idxRally]),
	array('Env'=>'Bay', 'Url'=>$modsBay[$idxBay]),
	array('Env'=>'Coast', 'Url'=>$modsCoast[$idxCoast]),
	array('Env'=>'Alpine', 'Url'=>$modsAlpine[$idxAlpine])
	);
    $aseco->addCall('SetForcedMods', array(True, $modCalls));
}
?>
Here it is Jamie, sorry for the delay, only just returned to this thread.

To add multiple loadscreens just add more elements to any/all of the arrays.

Regards,

Nick.

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by jamie_macdonald » 22 Sep 2008 16:29

Nice .. and ty ... Im sure many aseco users will find this very handy ... nice of you to post :1

LilSmiler
pedestrian
pedestrian
Posts: 8
Joined: 27 Mar 2008 22:08
Owned TM-games: TMUF,TMN, TMU
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by LilSmiler » 04 Nov 2008 11:40

great ^^ thanks for your efforts Nick - just what i have been tryin to get workin - thanks so much 8) :D 8)

Yorkshire
smooth traffic navigator
smooth traffic navigator
Posts: 192
Joined: 21 May 2008 08:39
Owned TM-games: TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Yorkshire » 04 Nov 2008 12:01

No problem, glad to be of help :) Make sure the ONLY image in the file is the loadscreen. Do not include icon.dds, as it will make nations players crash!

Regards,

Nick.

LilSmiler
pedestrian
pedestrian
Posts: 8
Joined: 27 Mar 2008 22:08
Owned TM-games: TMUF,TMN, TMU
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by LilSmiler » 04 Nov 2008 18:04

Stupid n00b Q alert!

Uhhmm, next thing is;
i don't spose there is any way of allowing track mods to show, after using a setForcedMods plugin for the loadscreen...

(shout at me if i deserve it :? )

Yorkshire
smooth traffic navigator
smooth traffic navigator
Posts: 192
Joined: 21 May 2008 08:39
Owned TM-games: TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Yorkshire » 04 Nov 2008 18:32

Hi,

Just add the track mods to the zip, or add more zips to the code to create random track mods.

Watch out the the size though, the good ones are really large!

Regards,

Nick.

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: [Question] Usage of "SetForcedMods" In Server?

Post by schmidi » 04 Nov 2008 21:56

@Yorkshire: thx for giving me an idea how this works

@smiler: disable mods override

made a plugin for xaseco out of it. fully configureable via xml-file
maybe usefull for some of u. since i cant add zips here, u can find it in our clan-forum: www.doh-nuts.at

regards
schmidi

LilSmiler
pedestrian
pedestrian
Posts: 8
Joined: 27 Mar 2008 22:08
Owned TM-games: TMUF,TMN, TMU
Contact:

Re: [Question] Usage of "SetForcedMods" In Server?

Post by LilSmiler » 09 Nov 2008 14:29

Schmidi ur plugin is great, mod loadscreens work great AND a track with custom loadscreen of its own and a track mod load perfectly now as well - great work ^^

Jycy
pedestrian
pedestrian
Posts: 6
Joined: 02 May 2008 16:31
Owned TM-games: TMS TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Jycy » 30 Jan 2009 17:27

Hello all

i want display only LoadScreen.dds for my server island, but if i make that, the map with mod can't display mod.
Have you an idea to do that ?

Thanks Jycy

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: [Question] Usage of "SetForcedMods" In Server?

Post by schmidi » 30 Jan 2009 23:19

to help u we need information about ur setup. which controller r u using?

did u disable forcemods override?

Yorkshire
smooth traffic navigator
smooth traffic navigator
Posts: 192
Joined: 21 May 2008 08:39
Owned TM-games: TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Yorkshire » 31 Jan 2009 07:42

Jycy wrote:Hello all

i want display only LoadScreen.dds for my server island, but if i make that, the map with mod can't display mod.
Have you an idea to do that ?

Thanks Jycy
If you are using another mod for a particular map then simply add loadscreen.dds to THAT mod package.

HTH,

Nick.

Jycy
pedestrian
pedestrian
Posts: 6
Joined: 02 May 2008 16:31
Owned TM-games: TMS TMUF

Re: [Question] Usage of "SetForcedMods" In Server?

Post by Jycy » 31 Jan 2009 11:18

I use dedicatedserver+fast (latest version) in server linux
actually i use TrackmaniaServer/GameData/Island/Media/Texture/Image/LoadScreen.dds, and packmask=island but i want map with mod, can display mod.
i think it's possible if fast or aseco dedect mod in next map, and disable forcemod

Post Reply