ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago

Hi,

I hope you guys can help me out.

I already searched on this forum and on google and have not found a solution.

I would like to make the below changes to a custom map without touching commandset.ini and map.ini so that it can be played online without problems.


1. General: Air Force

Is it possible to make the "carpet bomber science" only available for Air Force General once he has 3 stars?

By standard Air Force General has access to carpet bomber science from the beginning and can use it once he finished building a strategy center.


2. General: China Vanilla & China Nuke

I would like to deactive the use of sw but the uranium shell and nuclear tank upgrade should still be available.

My ideas how to solve it:

2.1 Is it possible to disable the launch nuke shortcut and launch nuke button?

or

2.2 Adjust the sw recharge time to 999?

or

2.3 What I can also do is move the two buttons for uranium shell and nuclear tank upgrad to another building (propaganda center for example).

But would it be possible to increase the costs for these two updates as the player does not have to build a nuke missile silo anymore?
Sponsor
SkyMix_RMT
7 years ago

1. General: Air Force

Is it possible to make the "carpet bomber science" only available for Air Force General once he has 3 stars?

Originally Posted by: ronky 


(Edit: Check below for answer)

2.1 Is it possible to disable the launch nuke shortcut and launch nuke button?

Originally Posted by: ronky 


From the building, yes, from the shortcut, not sure.

2.2 Adjust the sw recharge time to 999?

Originally Posted by: ronky 


Not possible.

2.3 What I can also do is move the two buttons for uranium shell and nuclear tank upgrad to another building (propaganda center for example).

Originally Posted by: ronky 


It is possible.

But would it be possible to increase the costs for these two updates as the player does not have to build a nuke missile silo anymore?

Originally Posted by: ronky 


No.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
AdrianeMapMaker
7 years ago

1. General: Air Force

Is it possible to make the "carpet bomber science" only available for Air Force General once he has 3 stars?

Originally Posted by: SkyMix_RMT 



```No.```

2.2 Adjust the sw recharge time to 999?

Originally Posted by: ronky 



```Not possible.````

Originally Posted by: ronky 



Skymix .. Dude you serious? .. its actually possible bro
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




i^love^mixery
7 years ago



Is it possible to make the "carpet bomber science" only available for Air Force General once he has 3 stars?

By standard Air Force General has access to carpet bomber science from the beginning and can use it once he finished building a strategy center.

Originally Posted by: ronky 




Yes, it is actually possible with this workaround:
Use the script Player -> Science -> Set Science Availability

Remove it from the beginning, re-add it with the same script once the player has reached 3 stars.

Use this script condition to check if player is 3 stars yet:
Player -> Science -> Player acquired a skill -> SCIENCE_Rank3

You have to create these scripts for all 8 possible players (player0 - player7). You don't need to check for factions, as the science will only be available for air force general anyway.




2. General: China Vanilla & China Nuke

I would like to deactive the use of sw but the uranium shell and nuclear tank upgrade should still be available.

My ideas how to solve it:

2.1 Is it possible to disable the launch nuke shortcut and launch nuke button?

or

2.2 Adjust the sw recharge time to 999?

or

2.3 What I can also do is move the two buttons for uranium shell and nuclear tank upgrad to another building (propaganda center for example).

But would it be possible to increase the costs for these two updates as the player does not have to build a nuke missile silo anymore?

Originally Posted by: ronky 



You cannot increase the costs, so moving the buttons to a different building might throw things off balance

You can remove the command button from the superweapon itself, but afaik with scripts you can't remove the command button from the ability shortcut bar on the right of the screen, so the nuke will still be launch-able.

You also can't change the countdown time, because the unit is not named.

The only thing I can think of:
Replace the Nuke Missile Silo with a different superweapon of an entirely different faction (Particle Cannon or Scud Launcher), add the command buttons for the upgrades to that superweapon, remove the command button to launch the superweapons... it would work but also confuse the hell out of people. The trick is that SW launch command buttons of an entirely different faction will not be displayed in the shortcut bar.

Alternatively you could sell-off the base of a player who dared to launch the nuke. But then you have to warn them with briefings of course.
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Wow, thanks for the feedback and advise ilovemixery!


Regarding the sw:

Good idea with the sw from another faction but I agree that it will confuse players too much.

Hence I decided to move the upgrades from nuclear silo to propaganda center.

But only if the internet center has been built first.

For these I added four separate scripts in the PLyrCivilian folder:


*** IF ***
'ChinaInternetCenter' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaUraniumShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 13 (1-12).
[???] Command button: 'Command_UpgradeChinaNuclearTanks' is added to all objects of type 'ChinaPropagandaCenter' in slot number 11 (1-12).

*** IF ***
'Tank_ChinaInternetCenter' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaUraniumShells' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 13 (1-12).
[???] Command button: 'Command_UpgradeChinaNuclearTanks' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 11 (1-12).


*** IF ***
'Nuke_ChinaInternetCenter' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
'Infa_ChinaInternetCenter' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


Unfortunately these scripts only work for me in multiplayer games but not for others.

How do I change these to make them work for other players as well?

I also have the same problem with GLA Upgrades, they appear in Supply Stash once Palace has been built.

Again these changes work only for me but not for other players.


*** IF ***
'Chem_GLAPalace' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Chem_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Chem_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Chem_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Chem_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Chem_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Chem_GLASupplyStash' in slot number 10 (1-12).

*** IF ***
'Slth_GLAPalace' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Slth_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Slth_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Slth_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Slth_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Slth_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Slth_GLASupplyStash' in slot number 10 (1-12).

*** IF ***
'Demo_GLAPalace' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Demo_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Demo_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Demo_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Demo_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Demo_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Demo_GLASupplyStash' in slot number 10 (1-12).

*** IF ***
'GLAPalace' has been built by Player 'PlyrCivilian'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'GLASupplyStash' in slot number 10 (1-12).






i^love^mixery
7 years ago
Replace "PlyrCivilian" with "LocalPlayer" and see if it works.

As long as you only script commands buttons with "LocalPlayer" it might work. For pretty much anything else it will cause a mismatch.

Also don't forget to add some briefings to tell people wtf is going on
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Thanks for the advise, I will try it out. Obviously I have a detailed briefing included already.


Another question:


1. Is it possible to make Lotus unable to capture oil? But she should still be able to capture buildings.

Currently I removed her capture function altogether.



2. I removed the Demo Bike from Demo General and replaced it with a normal GLA Bike.
Unfortunately I can not mount the normal GLA Bike with any Demo Infantry units or workers.
Is there a way to solve this?
i^love^mixery
7 years ago

Thanks for the advise, I will try it out. Obviously I have a detailed briefing included already.


Another question:


1. Is it possible to make Lotus unable to capture oil? But she should still be able to capture buildings.

Currently I removed her capture function altogether.

Originally Posted by: ronky 



How did you remove the capture function? I don't think deleting the command button will suffice, you can still just click on a building to capture it, no?

Anyway, there is no way without ini.



2. I removed the Demo Bike from Demo General and replaced it with a normal GLA Bike.
Unfortunately I can not mount the normal GLA Bike with any Demo Infantry units or workers.
Is there a way to solve this?

Originally Posted by: ronky 



Not really, no.
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
I removed Lotus capture ability by the below script, she can not capture anything anymore at all, no matter what.

*** IF ***
True.
*** THEN ***
[???] Command button: 'Command_ChinaInfantryBlackLotusCaptureHack' is removed from all objects of type 'ChinaInfantryBlackLotus'.
[???] Command button: 'Command_ChinaInfantryBlackLotusCaptureHack' is removed from all objects of type 'Infa_ChinaInfantryBlackLotus'.
[???] Command button: 'Command_ChinaInfantryBlackLotusCaptureHack' is removed from all objects of type 'Nuke_ChinaInfantryBlackLotus'.
[???] Command button: 'Command_ChinaInfantryBlackLotusCaptureHack' is removed from all objects of type 'Tank_ChinaInfantryBlackLotus'.

_____


I tried playing a couple of games with replacing "PlyrCivilian" with "Localplayer" as suggested by you.

Now the other players have access to the upgrades in supply stash and propaganda center.

Unfortunately the game mismatches after 10-15 minutes or so.

Any idea how to solve the problem?

Should I maybe use player0 - player5 instead of "Localplayer"? Similar to the AFG carpet bomber script you suggested?
i^love^mixery
7 years ago
The thing is, unlike the science script, you can't limit the add/remove command button scripts to a player. So If player1 builds the required buildings, the commands buttons will also be added to player0's buildings (if both players have the same faction).

You will have to work with LocalPlayer somehow.

I will check tomorrow for a variant that doesn't mismatch.
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Much appreciate your help and hope you find a solution regarding the mismatching.

I know that the below script (not the one I use) works without mismatching.

But that script is simpler as it doesnt take into account that you have to build, building X before upgrades will be available in building Y.


*** IF ***
True.
*** THEN ***
[???] Command button: 'Tank_Command_UpgradeChinaUraniumShells' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 5 (1-12).
[???] Command button: 'Tank_Command_UpgradeChinaNuclearTanks' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeChinaUraniumShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeChinaNuclearTanks' is added to all objects of type 'ChinaPropagandaCenter' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaPropagandaCenter' in slot number 9 (1-12).
SkyMix_RMT
7 years ago
Didn't know you could check if a player had acquired rank 3. Edited my reply.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
So I scripted like seen below now and it works in LAN mode with just me as a player. Will report if it works online without mismatching.


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player0'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player1'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player2'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player3'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player4'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player5'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player6'
*** OR ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).

//

*** IF ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player0'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player1'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player2'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player3'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player4'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player5'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player6'
*** OR ***
[???] 'Tank_ChinaInternetCenter' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaUraniumShells' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 13 (1-12).
[???] Command button: 'Command_UpgradeChinaNuclearTanks' is added to all objects of type 'Tank_ChinaPropagandaCenter' in slot number 11 (1-12).


//


*** IF ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player0'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player1'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player2'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player3'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player4'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player5'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player6'
*** OR ***
[???] 'Nuke_ChinaInternetCenter' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaPropagandaCenter' in slot number 13 (1-12).


//

*** IF ***
[???] 'ChinaInternetCenter' has been built by Player 'player0'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player1'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player2'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player3'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player4'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player5'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player6'
*** OR ***
[???] 'ChinaInternetCenter' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaUraniumShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'ChinaPropagandaCenter' in slot number 13 (1-12).
[???] Command button: 'Command_UpgradeChinaNuclearTanks' is added to all objects of type 'ChinaPropagandaCenter' in slot number 11 (1-12).


____________________________


*** IF ***
[???] 'Demo_GLAPalace' has been built by Player 'player0'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player1'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player2'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player3'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player4'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player5'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player6'
*** OR ***
[???] 'Demo_GLAPalace' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Demo_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Demo_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Demo_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Demo_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Demo_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Demo_GLASupplyStash' in slot number 10 (1-12).

//

*** IF ***
[???] 'GLAPalace' has been built by Player 'player0'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player1'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player2'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player3'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player4'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player5'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player6'
*** OR ***
[???] 'GLAPalace' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'GLASupplyStash' in slot number 10 (1-12).

//


*** IF ***
[???] 'Slth_GLAPalace' has been built by Player 'player0'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player1'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player2'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player3'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player4'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player5'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player6'
*** OR ***
[???] 'Slth_GLAPalace' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Slth_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Slth_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Slth_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Slth_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Slth_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Slth_GLASupplyStash' in slot number 10 (1-12).


//

*** IF ***
[???] 'Chem_GLAPalace' has been built by Player 'player0'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player1'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player2'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player3'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player4'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player5'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player6'
*** OR ***
[???] 'Chem_GLAPalace' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeGLAAPBullets' is added to all objects of type 'Chem_GLASupplyStash' in slot number 7 (1-12).
[???] Command button: 'Command_UpgradeGLAAPRockets' is added to all objects of type 'Chem_GLASupplyStash' in slot number 5 (1-12).
[???] Command button: 'Command_UpgradeGLABuggyAmmo' is added to all objects of type 'Chem_GLASupplyStash' in slot number 6 (1-12).
[???] Command button: 'Command_UpgradeGLAJunkRepair' is added to all objects of type 'Chem_GLASupplyStash' in slot number 8 (1-12).
[???] Command button: 'Command_UpgradeGLARadarVanScan' is added to all objects of type 'Chem_GLASupplyStash' in slot number 9 (1-12).
[???] Command button: 'Command_UpgradeGLAWorkerShoes' is added to all objects of type 'Chem_GLASupplyStash' in slot number 10 (1-12).

SkyMix_RMT
7 years ago
There is a problem with those scripts, like mixery said, if for example only player0 builds a internet center then all players from 0 to 7 will have uranium shells, neutron shells and nuclear tanks in their propaganda centers (as long as they are the same faction)
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Makes sense, what if I make eight separate scripts out of one? Would the outcome be the same? So like this:


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player0'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).

*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player1'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player2'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player3'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player4'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player5'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player6'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).


*** IF ***
[???] 'Infa_ChinaInternetCenter' has been built by Player 'player7'
*** THEN ***
[???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Infa_ChinaPropagandaCenter' in slot number 13 (1-12).

SkyMix_RMT
7 years ago
Yes the outcome would be the same because the script adds a command button to ALL players' propaganda center and not just player0 or player1 propaganda center.
The only way to do add command button to a single players' propaganda center is using the local player method, because the local player script only runs for the a player locally and not for the entire server, it will only add the buttons to the local player who built the propaganda center, and that might be the reason behind the mismatches.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago

Yes the outcome would be the same because the script adds a command button to ALL players' propaganda center and not just player0 or player1 propaganda center.
The only way to do add command button to a single players' propaganda center is using the local player method, because the local player script only runs for the a player locally and not for the entire server, it will only add the buttons to the local player who built the propaganda center, and that might be the reason behind the mismatches.

Originally Posted by: SkyMix_RMT 



So I checked all script options in World Builder and there does not seem to be a direct or indirect way to add one or several scripts which are enabling upgrades in building X of PlayerY if Player Y builds, building Z first. By using PlyrCivilian only host of the game gets the upgrades, if using Localplayer it works but the game mismatches, if using player0-7 everyone gets the upgrades. So there is no real solution?

There are like hundreds of very sophisticated script options in World Builder but something simple like that isn't included?
i^love^mixery
7 years ago

There are like hundreds of very sophisticated script options in World Builder but something simple like that isn't included?

Originally Posted by: ronky 



You couldn't imagine how often I had the same thought.

You also can't teleport units, can't set current or max healthpoints, can't use variables at all and many more things...

Anyway, I had an idea how this might work without mismatch but I actually somehow managed to forgot during the last 3 days, give me a moment 😁
i^love^mixery
7 years ago
Finally found my derailed train of thought, put it back on track and tested the result:

- Removing the command button does not cause mismatch
- Adding the command button causes mismatch

With that in mind I tried to fix it with these two scripts:

script "add"
(active, don't deactivate upon success)

*** IF ***
    True.
*** THEN ***
  [???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaCommandCenter' in slot number  6  (1-12).
  Enable Script 'remove'.

script "remove"
(non-active, do deactivate upon success)

*** IF ***
     Player '<Local Player>' has Less Than  1  unit or structure of type 'Nuke_ChinaBarracks'
*** THEN ***
  [???] Command button: 'Command_UpgradeChinaNeutronShells' is removed from all objects of type 'Nuke_ChinaCommandCenter'.


The result was quite ridiculous.

The game was off-sync but did not mismatch. On one machine player0 built the upgrade, on the other he didn't. The player's cash was not in sync (verified). And even if player0 built a mobile nuke and used the neutrone shells the shells worked normally on both machines and the game didn't mismatch, which is absolutely surprising. Simply put, on one machine the nuke used neutrone shells without the upgrade having been built. That sounds very alarming, this solution should not be used. Cash being off-sync is a big no (imagine cash requirements for units/buildings).

Then I came up with, quite frankly put, an ingenious solution:

(active, don't deactivate upon success)

*** IF ***
     Player '<Local Player>' has Less Than  1  unit or structure of type 'Nuke_ChinaInternetCenter'
*** THEN ***
  [???] Command button: 'Command_UpgradeChinaNeutronShells' is removed from all objects of type 'Nuke_ChinaNuclearMissileLauncher'.
  [???] Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaNuclearMissileLauncher' in slot number  16  (1-12).
*** ELSE ***
   Command button: 'Command_UpgradeChinaNeutronShells' is removed from all objects of type 'Nuke_ChinaNuclearMissileLauncher'.
   Command button: 'Command_UpgradeChinaNeutronShells' is added to all objects of type 'Nuke_ChinaNuclearMissileLauncher' in slot number  6  (1-12).

Note that one time the slot number is 16, the other time it's 6.

With this trick the game does not desync, because the other machine thinks it's legit if a player built an upgrade that is being listed in slot 16, even though the upgrade is not click-able (not even through the keyboard shortcut), simply because 16 is off-limit. The AI would probably still be able to build the upgrade, but I am quite sure that doesn't matter in this case (plus I don't think AI even uses neutrone shell nukes).

There, however, is one tiny glitch:
In order to update command button positions, the object needs to be re-selected. That means: If one player has the requirements to "see" the command button, and, while having the object selected, loses the requirements, the command button will still be there and click-able until the object is re-selected. It is the same the other way around, the button is not there until the object was re-selected.

If you, absolutely positively, need to fix that tiny bug, this would be the way to force-deselect everything, but will require some more work to check if the condition changed:

*** IF ***
[prerequities changed]
*** THEN ***
  Disable mouse and keyboard input.
  Enable mouse and keyboard input.


If you are unsure why and how syncing with LocalPlayer works you might want to check this topic:
http://www.cnclabs.com/forums/cnc_postst17952_The-logic-behind--Local-Player--explained-and-how-to-use-it-in-Multiplayer.aspx 
ronky
  • ronky
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
@ i^love^mixery:

I added your scripts and they seem to work. I will do some online multiplayer testing to check if a mismatch will occur or not. Thanks a lot for your help, much appreciated! Your thinking is really out of the box.


I have one last problem for which you might come up with a solution.

I removed the demo bike from demo general and gave him a normal gla bike instead.

Unfortunately demo infantry units like workers can not mount the bike because it is a gla and not a demo bike.

Is there a direct or indirect way to make a demo worker be able to mount a gla bike?

Tactical need: Placing a worker on a bike and send him to the base of the enemy at the start of the game to make him build a tunnel.