nowuniverse
8 years ago
Do we have a way to use script to set current power (electricity) for a player like the way we set the player's money?
Also, can we make a structure (like superweapon) operating without the required power or dependent on the power?
Sponsor
acidbrain
8 years ago

Do we have a way to use script to set current power (electricity) for a player like the way we set the player's money?

Originally Posted by: nowuniverse 


No, but you can use a map.ini and set the powersupply of a powerplant to a high value
EnergyProduction = integer
Positive integer is power supply, negative integer is power consumption


Also, can we make a structure (like superweapon) operating without the required power

Originally Posted by: nowuniverse 


EnergyProduction = 0


or dependent on the power?

Originally Posted by: nowuniverse 


It already is with the default settings, the america particle cannon has -10 energy production for example.

EnergyProduction = -10

Cheers

Panem et kirkinses
nowuniverse
8 years ago

Do we have a way to use script to set current power (electricity) for a player like the way we set the player's money?

Originally Posted by: acidbrain 


No, but you can use a map.ini and set the powersupply of a powerplant to a high value
EnergyProduction = integer
Positive integer is power supply, negative integer is power consumption


Also, can we make a structure (like superweapon) operating without the required power

Originally Posted by: nowuniverse 


EnergyProduction = 0


or dependent on the power?

Originally Posted by: nowuniverse 


It already is with the default settings, the america particle cannon has -10 energy production for example.

EnergyProduction = -10

Cheers

Originally Posted by: nowuniverse 



Thank you but how exactly you're going to put it in map.ini like do you have to list the specific player that thing will go to or the building itself...If so, how do we list the building name in the ini file?

I don't know how to list the name of the structure in the ini file.

Can you write a full example for me in ini form like say I want a particle canon from local player (me) to have the power production of 100...how do you put that in the ini file...

Thanks!
acidbrain
8 years ago


Can you write a full example for me in ini form like say I want a particle canon from local player (me) to have the power production of 100...how do you put that in the ini file...

nowuniverse wrote:


It depends on what faction you want to use, there are 5 factions that use a particle cannon(4 USA factions and Boss also but Boss is not playable by default) so you have to add the right building to the map.ini.
Go to the map you want to play, if it is an official map you have to extract the maps from the big file, you could change the big file itself but im not a big fan of that, if you dont know how to extract the maps you can find a tutorial with final big over Here .

Create the map.ini
Open the map folder of choice and right click to create a new text file, open the file and copy/pasta the code below, i added all the USA particle cannons...

; --- Vanilla USA ---
Object AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Airforce General ---
Object Airf_AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Laser General ---
Object Lazr_AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Superweapon General ---
Object Supw_AmericaParticleCannonUplink
  EnergyProduction = 100
End
When you are done right click and save file as map.ini, if you did everything right you see a file with a gear on it, you can throw away the original text file now.
Start the game and have fun...

Cheers
Panem et kirkinses
nowuniverse
8 years ago


Can you write a full example for me in ini form like say I want a particle canon from local player (me) to have the power production of 100...how do you put that in the ini file...

Originally Posted by: acidbrain 


It depends on what faction you want to use, there are 5 factions that use a particle cannon(4 USA factions and Boss also but Boss is not playable by default) so you have to add the right building to the map.ini.
Go to the map you want to play, if it is an official map you have to extract the maps from the big file, you could change the big file itself but im not a big fan of that, if you dont know how to extract the maps you can find a tutorial with final big over Here .

Create the map.ini
Open the map folder of choice and right click to create a new text file, open the file and copy/pasta the code below, i added all the USA particle cannons...

; --- Vanilla USA ---
Object AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Airforce General ---
Object Airf_AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Laser General ---
Object Lazr_AmericaParticleCannonUplink
  EnergyProduction = 100
End

; --- Superweapon General ---
Object Supw_AmericaParticleCannonUplink
  EnergyProduction = 100
End
When you are done right click and save file as map.ini, if you did everything right you see a file with a gear on it, you can throw away the original text file now.
Start the game and have fun...

Cheers

nowuniverse wrote:



Thank you!.

Where do you find the list of correct name/format of an object to put them correctly in ini file?

Some superweapons I use like the ICBM one doesn't have the right sidebar control button like regular super weapons. They only have countdown on the top. I have to click on the structure to use it. How do I make their control to show up on the sidebar control?

I extracted the mission and challenge maps last week. Do you know how to change map difficulty? I mean you can select it (easy,normal,hard) on campaign or challenge but I don't see a way to do it on skirmish because there's no difficulty button. The default difficulty setting has always been normal in skirmish. I want to try hard mode. Some scripts in mission maps are created for hard mode and it's complicated to change it around for normal play. Can you change difficulty of a map in map.ini so the game will read the map as hard not normal?

Thank a lot:)
i^love^mixery
8 years ago
btw.. you could make your map multiplayer-capable by using a script solution instead. You could potentially spawn a large number of nuke gen power plants outside the map boundaries and transfer them to each existing player.

Or you could also check by script constantly if all players have power. If no, spawn another power plant for the guy who is lacking.