You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Sebastien, Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.6 replies
Age of Kings Heaven » Forums » AI & RM Scripting » Circumvent hardcoded graphics with AI?
Bottom
Topic Subject:Circumvent hardcoded graphics with AI?
Khan Ivayl
Squire
posted 01-29-20 03:13 PM CT (US)         
I had this idea, but my knowledge of the code is too little, wondered if anyone would like to help out...

imagine I wanted a civilization to use a unique graphic, that is otherwise hard-coded and whose place in a unit cannot be found in the data... would this be something solvable with an AI script... was thinking something of the sort of:

load if civ-selected BRITON etc. ...

but how to reference graphics or data in a script?
AuthorReplies:
Leif Ericson
Seraph Emeritus
posted 02-04-20 02:38 PM CT (US)     1 / 6       
With Userpatch you can get a fair amount of data about an object, but graphics info is limited, and I think all of them are also viewable in AGE. What kind of info are you looking for?

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-
Khan Ivayl
Squire
posted 02-05-20 05:17 PM CT (US)     2 / 6       
The shepherd asking the sheep to come along...
Leif Ericson
Seraph Emeritus
posted 02-05-20 10:12 PM CT (US)     3 / 6       
If your goal is to use an AI to change the graphics, that won't work unfortunately. There's probably a way to detect when a villager is herding sheep, but there's not much you can do with that info besides commanding the villager to do something or send a chat with info about the villager.

I bet you already found it, but it seems like you can find the herding graphic in the Tasks section at the bottom of AGE if you're looking at one of the Shepherds. If you select the hunt task, the Proceeding Graphic seems to be the herding graphics. Unfortunately, it seems like you can't vary this graphic by civilization, so that's probably why you're asking about it.

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-

[This message has been edited by Leif Ericson (edited 02-05-2020 @ 10:37 PM).]

Khan Ivayl
Squire
posted 02-06-20 06:52 AM CT (US)     4 / 6       
Actually I don't see the herding graphic in the tasks, otherwise I would have solved it with unique upgrade of the unit (then you can uniquely change the herding graphics), instead for my shepherds I only see the kill and collect meat graphics of the shepherds in the tasks.

Thank you for helping, bests
Leif Ericson
Seraph Emeritus
posted 02-06-20 07:30 AM CT (US)     5 / 6       
Looks like you're right. Last night it really looked like the herding graphic, but it was just the graphic that kills the sheep.

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-

[This message has been edited by Leif Ericson (edited 02-06-2020 @ 07:35 AM).]

Khan Ivayl
Squire
posted 02-06-20 07:53 AM CT (US)     6 / 6       
That's why I was wondering... I know what the right graphic is called like in AGE, but since it is not connected to a unit or task in a visible way, it would be nice to make a piece of code that upgrades graphic x to graphic y for civilization z instead.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames