Jump to content


Photo

Coding Question


  • Please log in to reply
10 replies to this topic

#1 Gameaddict11707

Gameaddict11707
  • Members
  • 44 posts

Posted 25 November 2011 - 05:48 PM

I downloaded the Yuri Ore Refinery from Tiberian Graveyards, the one that SeaMan & DarkElf/Dethro made, but I have no idea how to code it so the AI will use it correctly. The rules coding would be simple, I guess, but what about the AI? I want to make it so they build a refinery, which spawns a miner that goes out & harvests ore, and brings that ore back to the refinery, rinse & repeat, like the other factions. But, the AI in un-modified YR builds, like, 2 or 3 Slave Miners from the War Factory, even though they have already built 1 after building a Bio Reactor & Barracks. How could I make the AI go about harvesting in the "traditional" manner (One refinery, the harvester that comes with it, and maybe one more from the WF, replacing harvesters as needed)?

#2 Beowulf

Beowulf

    Shipgirl

  • Advisors
  • 7,219 posts
  •  Azur Lane Fangirl

Posted 25 November 2011 - 10:37 PM

Just add it as normal, then tweak the AI to use that instead of Slave Miners. The AI functions, but it's not always optimal so I allow the AI to continue using Slave Miners as well.

NZ.org | BBPCG
Discord: The Astronomer#1314
Steam


#3 some_weirdGuy

some_weirdGuy

    title available

  • Hosted
  • 4,080 posts
  • Location:Queensland, Australia
  •  Weird Guy of the Forums

Posted 25 November 2011 - 11:59 PM

Considering that the two other factions function exactly how you desire this one too, wouldn't it be a good idea to look at how their AI is coded, and adapt that to your yuri team's AI?

Edited by some_weirdGuy, 26 November 2011 - 12:00 AM.

"I reject your reality and substitute my own" -Adam Savage, Mythbusters
Posted Image|Posted Image
Posted Image|Posted Image
Posted Image


#4 Beowulf

Beowulf

    Shipgirl

  • Advisors
  • 7,219 posts
  •  Azur Lane Fangirl

Posted 26 November 2011 - 10:32 PM

It's not always that simple, especially with Westwood. Since WW decided on a slightly different method for Yuri's faction, there are a few tags hardcoded to work specifically with Slave Miners and this could possible be hardcoded to [SMIN] and [YAREFN], but I can't say that for certain without a fuckload of testing. Anyway, with those slight changes, SOMETIMES Yuri's AI can act weak or stupid because it doesn't have YAREFN present even though it has a perfectly good Refinery at its disposal. It is entirely possible to make the Yuri AI function the same as the Allies and Soviets, but it helps to be aware of Westwood's changes in the process.

NZ.org | BBPCG
Discord: The Astronomer#1314
Steam


#5 Gameaddict11707

Gameaddict11707
  • Members
  • 44 posts

Posted 26 November 2011 - 11:28 PM

I've decided to come to an acceptable compromise and just use the refinery's gfx to replace those of the slave miner, remove the weapon from the deployed version while keeping it for the mobile version, and making whatever other changes I feel like.

#6 SMxReaver

SMxReaver

    Pro Gamer in Training

  • C&C Guild Staff
  • 399 posts
  • Location:United States, South Carolina
  • Projects:None ATM
  •  StarCraft 2
  • Division:C&C Guild
  • Job:Division Staff

Posted 27 November 2011 - 09:23 AM

Third side's Refinery works just fine as a replacement to the Slave Miner. I've played plenty of mods to believe there are no issues. The aforementioned hardcoding is only used when a slave miner is present.

#7 Nighthawk

Nighthawk

    Grumble Grumble.

  • Division Leaders
  • 2,946 posts
  • Location:Edinburgh
  • Projects:The Third War, Ares, misc side projects.
  •  Strategist and Modder
  • Division:C&C Guild
  • Job:Division Leader
  • Association

Posted 28 November 2011 - 07:40 AM

Additionally, and I can speak from personal experience here, if you try to have both a Slave Miner and a regular Harvester/Refinery combination (say you have Yuri subfactions or something), the Refinery faction's AI can sometimes get muddled.
Posted Image
Posted Image
Job Openings with the Guild: Division Staff, News Posters.
Job Openings with Ares: Documentation Maintainer, Active Testers.

PM if interested.

#8 Beowulf

Beowulf

    Shipgirl

  • Advisors
  • 7,219 posts
  •  Azur Lane Fangirl

Posted 06 December 2011 - 12:09 PM

Really? I've found the opposite effect. The Yuri AI performs better with both.

NZ.org | BBPCG
Discord: The Astronomer#1314
Steam


#9 Graion Dilach

Graion Dilach

    Supérior Caliburwielder

  • Project Team
  • 2,187 posts
  • Location:Iszkaszentgyörgy, Hungary
  • Projects:Infinty Engine modding, OpenHV, Attacque Supérior (sometimes)
  •  That guy you keep hearing the stories about.

Posted 06 December 2011 - 08:14 PM

Well, I use ordinary Refis in the AI and I haven't seen an issue with it so far.
kuuHd4s.png6pDXsCS.png
n0J1wqE.pngIX8pBXZ.png

AS Discord server: https://discord.gg/7aM7Hm2

ComradeCrimson: AS is the product of Hungarian acid
ComradeCrimson: And magical hussars
Dutchygamer: and Weird Al.


#10 Nighthawk

Nighthawk

    Grumble Grumble.

  • Division Leaders
  • 2,946 posts
  • Location:Edinburgh
  • Projects:The Third War, Ares, misc side projects.
  •  Strategist and Modder
  • Division:C&C Guild
  • Job:Division Leader
  • Association

Posted 08 December 2011 - 06:41 AM

Ah, but I had one subfaction unable to build the Slave Miner, and the others unable to build the Refinery. The non-Refinery subfactions worked fine. The Refinery one... not so much.
Posted Image
Posted Image
Job Openings with the Guild: Division Staff, News Posters.
Job Openings with Ares: Documentation Maintainer, Active Testers.

PM if interested.

#11 Gameaddict11707

Gameaddict11707
  • Members
  • 44 posts

Posted 08 December 2011 - 10:41 PM

I'm not using RPatch or NPatch or Ares, btw. Just vanilla Yuri's Revenge, so the subfaction thing is kind of irrelevant.
EDIT: I took a look at both the standard War Miner/Chrono Miner stuff for the AI, and the "Ghost Miner" from Mental Omega 2.0 to see an example of what to do to get the rules code working. Things seemed to work OK. (yes I'm using NP#0022SE now)

Edited by Gameaddict11707, 12 January 2012 - 04:39 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users