[SOLVED] How to restrict multiplayer options

(Taiidan Republic Mod) #1

For the next release of the Taiidan Republic Mod, ships up to carriers will be available. This means a multiplayer game involving the Republic will only work if the “carriers only” option is selected.

Currently the game crashes unless “carriers only” is used. Does anyone know how we can restrict the menu so that it is not possible to select any other option?

[Tutorial/Discussion] Customizing fleets in the multiplayer / PVCPU menu: Is it possible?
(Pascal.A - Director at Phoenix Interactive) #2

If i understand correctly, you have to do this :

On your rules .lua, you need to go on GameSetupOption tab,

	name = "resources",
	locName = "$3240",
	tooltip = "$3239",
	default = 1,
	visible = 1,   -------------  1 > Player can select option / 0 > Player can't view option, and default is the base choices.
	choices = 
		"$3241",			"0.5",
		"$3242",			"1.0",
		"$3243",			"2.0",

You can use this to disable / hold all option you don’t need. Or force one mod to have some option player can’t modify.

Pay attention about other option you don’t need and delete call of function about this option. ~

1 Like
(Chimas) #3

I would suggest a Taiidan x Taiidan DEMO, with just fighters and carrier (and collector).

(Pascal.A - Director at Phoenix Interactive) #4

Oh, i don’t see this. So yep, you can do this, or, you can change on .ship the canbuild value to have only this ship can be build by this other ship.

And with functionality added after August patch. [ something like : NewShipType.frontArmourDamage= getShipNum(NewShipType, “frontArmourDamage”, 0.8) but with other form…]

(BitVenom) #5

You could always just hide the ‘carriers only’ option and operate as if it were set, regardless. I mean, it is an option - the code to react to it is easy to find, and doesn’t actually have to allow user-control in this version of your mod… ?

(Taiidan Republic Mod) #6

Thanks all, I did it by commenting out the “no” option in the “carriers only” drop down menu within /scripts/rules/deathmatch.lua. I still want the player to be able to select “Yes” or “2 carriers”:

            name = "carriersonly",
            locName = "$2998",
            tooltip = "$2999",
            default = 0,
            visible = 1,
            choices =
                --"$3183", "0", -- this line commented out
                "$3184", "1",
                "$4802", "2",    

1 Like