bel3ve
  • bel3ve
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
If any of you have ever played Starcraft online you have probably played the Use Map Settings map Diplomacy.
(If you have not it is a WW2 European Game where you choose your country, capture cities, and depending upon how much
stuff you have you get money for it after each turn)
Is the world builder scripting powerful enough to make a map that resembles Diplomacy? I would rather not attempt something large and then have the pleasure of finding out halfway through. GUESS WHAT, IT WONT WORK!!!!!!!!!!!!!!!
UserPostedImage
Sponsor
Drummin
17 years ago
Well I'm not sure exactly if this would be the same, but you can script for if player has control of an area or building, give cash amount... set timer, give cash amount again etc. You could also take away funds if they then loose this area. You could also have the map get bigger as areas are taken giving you a longer campaign.
bel3ve
  • bel3ve
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
The get cash when you enter thing wont work. What if your guy entered and left Continuously.
And the map size ( its a 5 player quest for DOMINATION!)
An idea I have is if I make oil derricks, make their income like 2000 in a map.ini and then set its timer to 6 minutes.
UserPostedImage
Drummin
17 years ago
Well the conditions for your "Get Money" scripts can be what you want. You can divide your map into areas and if player has control of area (for time delay), add 1 to area control counter. Then based on "area count" then cash is paid out.


I don't like making a recommendation without checking it our first, so I decided to play around with "Unit Values" in an area and getting paid if conditions are met. I had suggested adding and subtracting from a counter in my previous post and after a frustrating half an hour gave up on counters. They're just not reliable. Instead I went with spawning a marker unit as I find they work all the time.

So I just made one area on the map (you can add as many as you wish) and set the value in the area at 1000. This means that if the player has a unit value of 1000 or more in the area the marker unit is spawned. Again, you can set the value to what ever you wish but for testing, I needed to move two tanks into the area to trigger the script. If they have less than this amount in the area the marker is removed.

Even though I had only made one area for testing I wanted to give an example of how the payday scripts work so I scripted it for five areas. Once again, change this as needed. So how it works is it looks for the marker for the first area. If the marker is found it pays a cash amount (set for $100 in the sample). This script will then activate the next area script whether a marker is found or not. At the end of this run of scripts, is a delay script for setting the time between paydays. I set it for 3 seconds for testing.

In case that's not clear, it's going to run through these area scripts very fast and pay for every marker that is found for this player, then hit the delay script and start over. So the more areas the player controls, the bigger the payday.

Also Note: I only scripted paydays for two rooms or the first two player slots. All rooms should be scripted.

In case you're not sure about this type of scripting, it's all done in the PlyrCivilian folder and identifies players by the "Room" they start in. ("Rooms" are the slots found on the screen when starting a game where you pick your faction and assign teams, colors etc.) This type of scripting should be done for all eight rooms represented by player0 through player7.

In any case, this sample works well and as scripted, pays the player $100 every three seconds if he has a value of 1000 (two tanks) in the area. If he doesn't have the value in the area, he isn't paid.
  TestValue.zip (8kb) downloaded 2 time(s).
bel3ve
  • bel3ve
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
Thank you Drummin, I am a little new at Generals scripting. The one thing that gets my is how there is no Preserve trigger, It is the god of a scripting commands. It says repeat me, but on Generals I have to do all these tick boxes etc.
UserPostedImage
bel3ve
  • bel3ve
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
Ok, Issues are appearing in my map. It crashes like 40 secs into the game and any attempt of mine to correct them has failed.
Can you find the error? Ive tried everything (almost!)
The teams and scripts are giving me problems.
The Money scripts are about 30% done but those aren't the issue. Its SOMETHING to do with the dang AI and its incompatibility with life. 😠 <- WorldBuilder scripting and Team building.   HelpMe.zip (60kb) downloaded 1 time(s).
UserPostedImage
Drummin
17 years ago
You should never spawn to "" as that will crash the game every time. You never really said, but I hope this mission is for Zero Hour as I just spent several hours redoing all the scripts and teams with Zero Hour World Builder. Here's what I did.

*I relabeled your areas and waypoints so they corresponded to one another, as it was confusing as it was.
*All default script lines, such as the condition "IF TRUE" and the action "Does Nothing" needed to be removed where you have other conditions or actions.
*All script and folder names should be unique.
*I changed all references to "" or "" to actual player names. In most cases these would work but I wanted absolute values to eliminate any possible problems. Also, never spawn to "" as this will crash every time.
*Players started with no money, so it would be hard for an AI player to build teams. I added starting cash.
*For team production, you would make a subroutine script that's named the same as your team. This script would use default properties as in (IF TRUE does nothing) and this script would always be active. This script would be used in the production condition section on your team properties window. You would then make another script that would then "RUN" this subroutine script.
*Team action subroutine scripts are always active and I made a set for each team to Guard an area and then a general Hunt script.
*Team production priorities were set so teams for the center areas are made first, then teams working back to the AI base, then final teams working toward USA base.
*I also made scripts to reactive the gattling gun spawning scripts if the gun is taken out. I added a 30 second delay.
*Because the China player starts with four Gattling Guns, victory conditions were changed so if China has 14 Gattling Guns you loose. USA still has 10 to win.


See how this works for you.   HelpMeTwo.zip (62kb) downloaded 1 time(s).
bel3ve
  • bel3ve
  • 100% (Exalted)
  • Major Topic Starter
17 years ago
Oh wow! That wasn't all needed though. The 4 Gatling cannons were because later in my map making im going to scipt the AI so it actually plays hard. The 4 cannons were just defense. And the area names and stuff, I only use them once in script lol. All I wanted was a Error Find, not a complete renovation. Oh well, Its good enough because you saved ME hours of work.😁

EDIT : (or after I opened the map) DANG!!! You almost made the map FOR ME!!! Now I must go and Test it and then add some more serious teams like If America has Lots of this build lots of this. (ex. tanks to tank hunters.
UserPostedImage