logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,667
Posts: 94,503

Administrators:
DeeZire, Redemption

There are currently 48 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Red Alert 2 & Yuri's Revenge Editing Discuss any modding related issues to do with Red Alert 2 and Yuri's Revenge here.

Reply
 
LinkBack Thread Tools
Old 12-16-2004, 12:54 AM   #1 (permalink)
Senior Member
 
Join Date: Oct 2004
Posts: 250
Default Fun new things in an upcoming AI mod....

In this series of images, I show how I've made the AI hunt down and "camp" the nearby ore field.

Image one: the AI builds a base node vehicle. Forgive the GDI imagery on the soviet vehicle, we're still in progress here...



Here we approach our target:



Finally, *POOF*, we have a base node, a small deployable node ala Cannis mod [node image used currently without permission], of a BaseNormal place to put stuff:

.

Now we have a place to put things, we can prop up some tesla coils around this baby, and have a destination with a known structure id # for AI move to commands.

Above image also shows you an example of how the AI can do something, but still make bad choices. The intent was to build a refinery here next, giving us that much better harvesting latency, not that the AI really needs it. But it will make it look busy, and annoy the player... a good thing in my mind.

Above effect achieved by subjugating the YURI slave miner logic to my will. To use it, you'll have to be willing to break Yuri slave miners in an imporant way, so if that doesn't work for you, this hack won't either. Will post necessary code upon request.


C//
Courageous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-16-2004, 02:08 AM   #2 (permalink)
AAG
Senior Member
 
Join Date: Oct 2003
Location: Russia, Novosibirsk
Posts: 489
Default

Cool. And what are the codes of such thing?
AAG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-16-2004, 08:40 AM   #3 (permalink)
Senior Member
 
AlliedG's Avatar
 
Join Date: Sep 2003
Location: U.K.
Posts: 726
Default

okay smaller comment but could you refer to Allies as Allies, instead of GDI, just sounds a little wierd, but good progress.
AlliedG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-16-2004, 10:35 AM   #4 (permalink)
Senior Member
 
Join Date: Oct 2004
Posts: 250
Default

Sorry about the GDI reference, AG, just a brain fart ... must be my subconcious wish for Tib Next instead of RA.

SlaveMinerShortScan=60
SlaveMinerLongScan=60
SlaveMinerSlaveScan=60
SlaveMinerScanCorrection=200

The above make the vehicle want to go to the ore, but not move once it gets there. The "200" number should really be set as high as the longest distance on the largest map. The "60" figures say how far the vehilces will go to find ore. The "200" figure is how far the building will go to undeploy into a vehicle and find ore. Thinking about this, for this particular hack, you don't actually really need to make the above particular adjustments so extremely, because it's normal for base vehicles (or conyards) to undeploy and move around. In my mod, I have buildings that produces slaves that aren't refineries, and they don't have anything to undeploy into, so I really never want that to happen. Hence the above figures.


[BASEV1]
Image=MCV
UIName=Name:SMIN
Name=BASEV1
Nominal=yes
ToProtect=yes
Category=Support
Prerequisite=FACTORY
Strength=2000
Armor=medium
Turret=yes
OpportunityFire=yes
TechLevel=1
Sight=4
Speed=3
Owner=British,French,Germans,Americans,Alliance,Ru ssians,Confederation,Africans,Arabs,YuriCountry
RequiredHouses=British,French,Germans,Americans,Al liance,Russians,Confederation,Africans,Arabs,YuriC ountry
AllowedToStartInMultiplayer=no
CrateGoodie=yes
Storage=20
Cost=1
Soylent=10
Points=55
ROT=5
Crusher=yes
Crewed=no
SelfHealing=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUM U60
MaxDebris=6
DebrisTypes=TIRE
DebrisMaximums=4
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1} ;drive locomotor
Weight=3.5
MovementZone=Crusher
ThreatPosed=0 ; This value MUST be 0 for all building addons
ThreatAvoidanceCoefficient=.65
DamageParticleSystems=SparkSys,SmallGreySSys
ImmuneToVeins=yes
ImmuneToPsionics=yes
ImmuneToRadiation=yes
ZFudgeColumn=9
ZFudgeTunnel=14
ZFudgeBridge=7
Size=3
StupidHunt=yes ;this guy can't handle a hunt command, so he should just run towards the player
Trainable=yes
Enslaves=SLAV
SlavesNumber=0
SlaveRegenRate=500
SlaveReloadRate=25
ResourceGatherer=yes
ResourceDestination=yes
DeaccelerationFactor=.2
Accelerates=false
Bunkerable=no
OmniCrushResistant=yes
Parasiteable=no
Unsellable=yes
BuildTimeMultiplier=0.8
DeploysInto=AINODE1
DeployFacing=0

[AINODE1]
Image=NAAINODE
UIName=Name:NACNST
Name=AINODE1
Prerequisite=FACTORY
BuildCat=Tech
;ConstructionYard=yes
;Factory=BuildingType
Strength=1000
Armor=concrete
TechLevel=1
Adjacent=2
Owner=British,French,Germans,Americans,Alliance,Ru ssians,Confederation,Africans,Arabs,YuriCountry
RequiredHouses=British,French,Germans,Americans,Al liance,Russians,Confederation,Africans,Arabs,YuriC ountry
UndeploysInto=BASEV1
Sight=8
Cost=3000
Points=80
Power=0
Capturable=true
Crewed=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUM U60
MaxDebris=15
MinDebris=5
DebrisAnim=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbr is4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
ThreatPosed=0
DamageParticleSystems=SparkSys,SmallGreySSys,BigGr eySmokeSys
DamageSmokeOffset=1470,1060,1078
TogglePower=no
ProtectWithWall=no
EligibileForAllyBuilding=yes
ImmuneToPsionics=yes
AIBuildThis=no

So you have the vehicle, the structure, some minor changes to the Yuri logic... from here, you only need one other thing. It's already in your file. Look at the Yuri slave miner ai command. Tis a bit wierd.

It is "Assign new mission: guard area", followed by "repeat until success".

I regard this as strange, as in my experience assign new mission is otherwise generally terminal. I don't know how or why repeat until success could ever be seen or acknowledge by the team. But so be it, I left it the way it was.

The actual tags you'll want to use on the vehicle and structure will most likely be different. You'll see that the base vehicle I made is really just a SMIN clone. I believe all that's necessary to get it to go to the ore are the "Resource" tags. It's in a more pristine cloned state because I was having some rules and triggers problems issue recently, and needed to get into working mode again (I had one of those mysteriously broken moments).

C//
Courageous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-16-2004, 11:50 PM   #5 (permalink)
AAG
Senior Member
 
Join Date: Oct 2003
Location: Russia, Novosibirsk
Posts: 489
Default

And does normal slave minner behaive? Does it conflict to BASEV1? I mean do you have I Errors?
AAG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-17-2004, 12:12 AM   #6 (permalink)
Senior Member
 
Join Date: Oct 2004
Posts: 250
Default

Well read the slave miner comments (on the tags in your ini very carefully). They are only a little bit wrong. Lemme see... I'm looking them up myself so I can tell you how the comments are mistaken...

From the original:

SlaveMinerShortScan=8 ;gs the Slave Miner looks this far to decide if it needs to move closer, but the new spot needs to be SlaveMinerScanCorrection cells better to warrent moving

Okay. The short scan comment isn't right. Note how I set the "correction" to 200. Not so. It /will/ relocate to a better spot (as a vehicle), within the above suggested values of 60, even with the correction value of 200.

By doing this, I can say "slave miner vehicles will find ore up to 60 cells away, but once they get there, they will only go to ore 200 cells away (which is my way of spelling "never").

The normal slave miner will misbehave (once it deploys to a YAREFN it will never undeploy), if you use the settings I quote above, because the behavior I just described isn't right for a normal slave miner. But you shouldn't have to without the other features that my mod has.

And no, no IEs. I never had any problem with that. When you experiment, if things are screwed up, you'll see things like the building undeploy into limbo. POOF! Where'd it go? Very strange. Once something's a slave-miner-cum-refinery, if it wants to undeploy, it really wants to undeploy.

[I take it you've played Yuri, and know how the slave miner becomes the refinery, flips around, becomes the slave miner, flips, becomes the refinery, ad nauseum].

Also, if you don't use the AI command sequence given, you get funny behavior. It may deploy right out of the war factory. I found this strange, because the behavior for the unit is different for you when you build it as a human player. It just self automates and heads off to the ore. I had to go look up WW's ai.ini entry to get this to work right (even though it's not gonna mine ore, it needs the ai.ini entry for Yuri Slave Miners).

Really, it's worth experimenting around with and kind of interesting.

[EDIT: in my mod, what follows this guy is a special vehiclce that deploys into a cloned soviet refinery ("get closer to the ore strategy") and several special vehicles that deploy into base defenses, as well as bevy of drones, to harry any competing miners and other vehicles]

C//
Courageous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-17-2004, 12:28 AM   #7 (permalink)
AAG
Senior Member
 
Join Date: Oct 2003
Location: Russia, Novosibirsk
Posts: 489
Default

And how to make it so that when new base unit is deployed. New refinary would be built near it, not near primary base?
AAG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-17-2004, 12:39 AM   #8 (permalink)
Senior Member
 
Join Date: Oct 2004
Posts: 250
Default

You clone up a synhetic unit that deploys into a clone of the soviet refinery. The synethetic unit will need certain tags (e.g., Invisible=yes) and an imageless art entry. I'd also recommend giving it the chrono locomotor so it just goes *POOF* and its there, then it deploys.

C//
Courageous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-17-2004, 12:47 AM   #9 (permalink)
Senior Member
 
Join Date: Nov 2004
Posts: 295
Send a message via MSN to NineBreakerFan
Default

better yet idea

[AINODE1]
FreeUnit=That Thing That Deploys In To An Ore Refinery
NineBreakerFan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-17-2004, 12:51 AM   #10 (permalink)
Senior Member
 
Join Date: Oct 2004
Posts: 250
Default

That actually /is/ a better idea. Thank you very much. It solves a certain /other/ problem in a way that I haven't thought of before. See, once you get into writing these triggers for deploying vehicles into buildings, one of the first things that you discover is that deployed vehicles leave their teams. This leaves one without being able to make use of the Max value for a team type, while one is simulatenously without a way to express compound conditionals in triggers (example: "I want this team to be formed if there is at least one AINODE1 and < 1 NAREFN2"... can't do it).

There is a certain trick one can do to keep the teams alive using a thing I call a "sentinel," a special fake unit that baloon hovers, has no threat value, is immune, is insignificant, and suicides after a very long time. But this hack has problems of its own, and will require a great deal of testing and tuning to get right. I'm glad that someone offered up a way that I could avoid it in some contexts.

Thank you.

C
Courageous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Teasers from an upcoming AI mod... Courageous Red Alert 2 & Yuri's Revenge Editing 71 12-14-2004 03:46 AM
Need help with 3 things adamstrange Generals & Zero Hour Editing 7 08-22-2004 06:11 AM
Some things.. Medalmonkey Generals & Zero Hour Editing 4 11-26-2003 01:56 AM
Strange things in map faku Generals & Zero Hour Editing 10 08-28-2003 12:54 PM
the 5 things I think EA should do... jonwil Generals & Zero Hour Editing 21 07-09-2003 10:13 AM


All times are GMT -4. The time now is 06:26 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.