Page 1 of 1

Merr_Bonus ... Random Bonus(v1)

Posted: Tue Sep 13, 2011 9:07 pm
by Merr
Randomized Bonus Script. ... Can setup a random bonus for a scenario!

Includes ... AI Bonus Script ... The AI will use the Bonus like a player!

Six (or shall I say "sick" :wink: ) New Scenarios (simple to demonstrate logic, nothing fancy) ;

:arrow: [Bonus] ... The basic bonus script, randomized bonus, preset for entire scenario.

:arrow: [LasVegas] ... A winter scenario that randomizes the AID bonus every turn (slot machine style)(both sides).

:arrow: [RainToClear] ... Rain prevents Airstrike ... Chance to clear every turn, Close Air Support available when Sky Clears (both sides).

:arrow: [Airstrike_LOS] ... Airstrike Target Selection (AI) will focus on units within LOS. Germans set for Stuka!

:arrow: [Artillery_LOS] ... Artillery Target Selection (AI) will focus on units within LOS. Germans set for 150mm Battery!

:arrow: [Total_Random] ... AI target selection randomized between, (1)random unit, (2)random unit within LOS. LasVegas Style aid bonus(both sides).

Notes;
I used the PLUGIN logic for each scenario to keep the scenario script "clean". I used Amaris' Random Map PLUGIN(beta7) to build map!
My favorite scenarios are ... LasVegas and Total_Random ... Setting the AID random(each turn), the AI will surprise me everytime!
The AI will not cancel the mission ... I can add this later, pending any comments.
All scenarios have random enemy units (slightly).
AID bonus = Revive, DrillSGT, ReSupply, Rally, and Unavailable.

Comments/Suggestions welcome.

Download Link ... http://www.gamefront.com/files/20773381 ... nus_v1.zip

ENJOY!

Posted: Tue Sep 13, 2011 11:08 pm
by pipfromslitherine
Hmmm - I'm running out of adjectives for the awesome modding work. I might have to start using pictures (I know I have an astounded bunny one here somewhere).

Looks really awesome. Does it need a new plugin of your own devising? One thing - if it is used in-mission it will need its own script ID value, to avoid conflicts with other scripts (or it just won't save out its values).

I will add user plugins to my todo list, as it appears there is some demand!

I'll grab it and take a look tomorrow.

Cheers

Pip

Posted: Wed Sep 14, 2011 12:54 am
by Merr
I thought about a PLUGIN ... Last December, I made a little attempt ... viewtopic.php?t=20409

When I saw that Amaris hit the "global limit", I looked at Universal Variables instead. I feared that Amaris hit the limit because all of the PLUGIN scripts used (and thus added to the total) many globals. So, with that in mind, I built this using only universal variables, except for the "gBombardment" which needs to be set to zero at the start, otherwise the AI will immediately cancel the strike ... in other words, the logic would never kick-start itself for the AI.

Currently, I only have two conditions for the AI to select targets ... (1) random unit, (2) random unit within LOS.

I left the code open for designers to create their own condition ... e.g. Hit an enemy Objective? If I was to create a PLUGIN, that logic would only be set (thus only work) for the VP plugin logic. User scripts that contain VP's using other logic wouldn't work. Granted, if it was set for plugin VP logic, it only seems logical that the designer would understand that it wouldn't work elsewhere. With that in mind, my plugin would need to split off and partially be included into the other plugins ... e.g. Player places a VP, then clicks a box next to it designating whether or not they want the AI to consider (or look) at this VP for Target Selection.

By itself, the scripts all work (even for MP) ... but more conditions need to be in place.
Another example would be the Airstrike Logic ...

The Airstrike Logic works best with Close Air Support planes, e.g. P47,Hurricane,Typhoon,Fw190,Stuka,and ME262.
It gets a little ugly with Medium Bombers, e.g. B26,He111 ... The arrival delay is longer, impact footprint larger, and aircraft won't "seek" a target.
It gets VERY ugly, if not harry, when you look at the B17 ... Same as medium bomber but with a devastating footprint!

So, for a PLUGIN to work correctly, the designer needs to control the Airstrike Logic a bit more, perhaps setting up level bomber targets manually (like setting VPs).

I can sit down and build conditions until I'm blue in the face :oops: ... but they need some kind of organization as well.
I was thinking about grouping conditions based on "Personality" ... e.g. wreckless, stupid, reserve, etc.

When you get a chance to look at the scripts you'll see how basic (and hopefully simple) they are.
They are built for random maps, to give the AI a simply little brain. :wink:

Posted: Wed Sep 14, 2011 3:44 am
by pipfromslitherine
So it doesn't use a plugin, just some scripts? That's fine - it's just that plugins can't be distributed as simply and so I wanted to be clear what you were doing :).

Cheers

Pip

Posted: Wed Sep 14, 2011 4:37 am
by Merr
pipfromslitherine wrote:So it doesn't use a plugin, just some scripts?
Correct ... Consider it nothing more than just a "template" that a designer can add to a scenario.

It does, however, have the potential of being a plugin, but it needs to be inter-twined (or woven) into the other plugin(s).
IMO, that would be the best approach.

For now, I hope it will allow a simple "script challenged" player the ability to add a Bonus (whether random or fixed) for the AI (or MP play) without too much work.

This is the Basic Bonus script(s) that I'll be using in any future Random Battles.

You know Pip ... To demonstrate the Random Bonus another "notch", I'm going to modify your wonderful AXIS_SPECIAL_MISSIONS :wink:

:?: What if .... The allies rolled a B17 bonus :shock:
:?: What if .... The allies rolled an artillery bonus :(
:?: What if .... The allies used the Rally on that M10 that you thought ran away :P


Hmmmm 8)

Posted: Wed Sep 14, 2011 5:03 am
by Rosseau
With most people, you get a new scenario. But with you and Amaris.... it's scary :shock:

Edit: Played my first scenario tonight with 1st Random option. I know I am not a very good player, but... AI won easily and played an uncannily good game. If its artillery strikes were on target, it would have been a massacre. Way to go!

Posted: Thu Sep 15, 2011 4:16 pm
by Amaris
GREAT! :P

I will try to find time to watch it all. Perhaps this weekend. Anyway congratulations!

Posted: Thu Sep 15, 2011 11:32 pm
by Merr
Rosseau wrote: Edit: Played my first scenario tonight with 1st Random option. I know I am not a very good player, but... AI won easily and played an uncannily good game. If its artillery strikes were on target, it would have been a massacre. Way to go!
Thank you for trying them.

I'm working on a new scenario(solo) ... It's a huge (random) scenario that depicts the Tank Battle at Arracourt ...

It will be including all the random junk I can glue together, including Amaris' RandomMap technology.
A few "What-If's" for the German side as well.

Initial tests shows everything is functional ... I may tweak the scenario here and there.

Posted: Thu Sep 15, 2011 11:54 pm
by pipfromslitherine
Hmmm - if I string out the iPad version long enough, someone will have sorted out all the random scenario stuff for me! Mwwwwaaaa ha ha!!!

(twirls mostache)

No - not really. I don't have a mostache.

I have to confess though, that with the iPad and a number of key features we want in for ongoing expansions, random maps are a little way off on my tasklist (although we do want them for the next update) but it does look like you guys will get there first!

If there are any script features that would help you or Amaris, then let me know. If they are simple I can get them in and get you guys some test versions...

Cheers - and a snappy salute to you both.

Pip

Posted: Fri Sep 16, 2011 4:02 pm
by Merr
pipfromslitherine wrote: If there are any script features that would help you or Amaris, then let me know. If they are simple I can get them in and get you guys some test versions...
I had a look at the new objects in Arhem folder .... the HEIGHT and HEIGHT(UI) object seemed interesting.
Granted, it's in place to work with the new bridge work, yeah.

I couldn't "place" the height ... well, I called it with "PlaceObject" but nothing grew from it.

Is "adding height" via script still work-in-progress ?

Thanks.

Posted: Fri Sep 16, 2011 4:19 pm
by pipfromslitherine
I have added it to the new todo list I have for the game. I'll punt you a version once it is in and you can have a play :). We are going to likely be more active with beta versions going forward, and so hopefully it will mean you guys can have any new and cool stuff that you are aching to do ready for release almost as soon as each update :).

Let me know if you have any other thoughts for features. No matter what they are - often things that seem tricky are actually fairly simple (although sadly the opposite is also often true ;).)

Cheers

Pip