Don't ever use "watch-tower-line" in an ai, it is bugged.
Rather use "watch-tower", which functions as you would expect "watch-tower-line" to function.
Any time you use "can-build" with "watch-tower-line", it always returns true, even if you don't have the resources, and any subsequent build commands for other buildings will be bypassed ...
I got this advice from ER.
Promi 2.11
- UnfairestEel
- Waheguru
- Posts: 1835
- Joined: Sat Jul 30, 2011 4:31 pm
Re: Promi 0.9
Knowledge is Time.
This simple fact can be derived from these beliefs:
Time is Money.
Money is Power.
Knowledge is Power.
Therefore, Knowledge is Time.
Q.E.D.
This simple fact can be derived from these beliefs:
Time is Money.
Money is Power.
Knowledge is Power.
Therefore, Knowledge is Time.
Q.E.D.
- Promiskuitiv
- Waheguru
- Posts: 1364
- Joined: Thu Nov 10, 2011 1:07 pm
Re: Promi 0.9
@marathon
I've already heard of both of those commands but from what i've heard i shouldn't use attack-now.
About the attack groups i don't know how they work. I mean when do they attack? Only with TSA (what would be good) or some command like attack-now?
@UnfairestEel
Okay ty, fixed.
Btw, what's game time? Does (game time == 60) equal 60 seconds?
Aaand what's with the escrow system? I kinda know what it is, but can i only set escrow in percentages? And how does that work? Is it like (with 10% wood escrow percentage) that when i chop 100 wood, that 10 wood can't be used for anything else than "build-with-escrow"(/train/research) + "release-escrow-percentage wood"?
If that's true i might finally get my AI to not waste all resources so that i can research imperial age. x)
I've already heard of both of those commands but from what i've heard i shouldn't use attack-now.
About the attack groups i don't know how they work. I mean when do they attack? Only with TSA (what would be good) or some command like attack-now?
@UnfairestEel
Okay ty, fixed.
Btw, what's game time? Does (game time == 60) equal 60 seconds?
Aaand what's with the escrow system? I kinda know what it is, but can i only set escrow in percentages? And how does that work? Is it like (with 10% wood escrow percentage) that when i chop 100 wood, that 10 wood can't be used for anything else than "build-with-escrow"(/train/research) + "release-escrow-percentage wood"?
If that's true i might finally get my AI to not waste all resources so that i can research imperial age. x)
- kram1138
- Guru
- Posts: 815
- Joined: Sun Jun 26, 2011 11:54 am
- Location: Winnipeg, Canada
- Promiskuitiv
- Waheguru
- Posts: 1364
- Joined: Thu Nov 10, 2011 1:07 pm
Re: Promi 0.9
I tried this:
PS: The byzantine folder isn't in the 0.9 version you can download, but of course that's not the error. "Error 2005 invalid identifier: load"
:/
but it's not possible. Does anyone know how to do something with the same effects?(defrule
(not (players-civ any-enemy mayan))
(not (players-civ any-enemy aztec))
=>
(load "Promi\BYZANTINE\buildings"))
(defrule
(or (players-civ any-enemy mayan)
(players-civ any-enemy aztec))
=>
(load "Promi\BYZANTINE\buildingsmeso"))
PS: The byzantine folder isn't in the 0.9 version you can download, but of course that's not the error. "Error 2005 invalid identifier: load"
:/
Last edited by Promiskuitiv on Sun Dec 04, 2011 12:31 am, edited 1 time in total.
- THE RULER
- Guru
- Posts: 655
- Joined: Sat Feb 20, 2010 10:55 am
- Location: FRG
- Contact:
Re: Promi 0.9
I hope scripter64 will imply conditional loading into his UP work - for 1.0c you can't load in runtime.
You can only randomly load files in 1.0c
That's why I wait coding for 1.1 until our scripters' hero has found a solution ( if possible at all)
so far you can split into different proceedings with goals only
Edit:
(not (players-civ any-enemy mayan))
(not (players-civ any-enemy aztec))
same is:(nor(players-civ any-enemy mayan)(players-civ any-enemy aztec))
You can only randomly load files in 1.0c
That's why I wait coding for 1.1 until our scripters' hero has found a solution ( if possible at all)
so far you can split into different proceedings with goals only
Edit:
(not (players-civ any-enemy mayan))
(not (players-civ any-enemy aztec))
same is:(nor(players-civ any-enemy mayan)(players-civ any-enemy aztec))
It's poison and it's blood and big fire, big burn - into the ashes and no return
- Promiskuitiv
- Waheguru
- Posts: 1364
- Joined: Thu Nov 10, 2011 1:07 pm
Re: Promi 0.9
Thank you for your fast response!
Now i've got a really weird problem. The "constants" file for my byzantines works absolutely fine (if my AI gets byzantines). But if i get the japanese civ for example i get an error that leads to the constants file in my byzantines folder EVEN if it's not even supposed to load this "constants" file! It looks like this:
Edit: Okay, interesting ... The error was in line 178. I just changed positions of some of the rules etc. there and the error remains at line 178th! Even if there's something totally different now!
When i created a new file which wouldn't ever consider the BYZANTINE folder at all, it loaded the right constants and worked without any problems.
So did i just do any mistakes with #load-if?
Now i've got a really weird problem. The "constants" file for my byzantines works absolutely fine (if my AI gets byzantines). But if i get the japanese civ for example i get an error that leads to the constants file in my byzantines folder EVEN if it's not even supposed to load this "constants" file! It looks like this:
Can anyone pleeease test this and help me out there? I'm trying since ages (at least it feels like that) and it get's rather frustrating to have no clue how to get the AI working again (except for the byzantines which are doing fine). ;/#load-if-defined BYZANTINE-CIV
(load "resign - AI Ladder")
(load "Promi\BYZANTINE\initialization")
(load "Promi\BYZANTINE\constants")
(load "Promi\BYZANTINE\g-stuff")
(load "Promi\BYZANTINE\advance")
(load "Promi\BYZANTINE\researches")
(load "Promi\BYZANTINE\units")
(load "Promi\BYZANTINE\TSA")
(load "Promi\BYZANTINE\trade")
(load "Promi\BYZANTINE\escrow")
(load "Promi\BYZANTINE\buildings")
#end-if
#load-if-not-defined BYZANTINE-CIV
(load "resign - AI Ladder")
(load "Promi\initialization")
(load "Promi\constants")
(load "Promi\g-stuff")
(load "Promi\advance")
(load "Promi\researches")
(load "Promi\units")
(load "Promi\TSA")
(load "Promi\trade")
(load "Promi\escrow")
(load "Promi\buildings")
#end-if
Edit: Okay, interesting ... The error was in line 178. I just changed positions of some of the rules etc. there and the error remains at line 178th! Even if there's something totally different now!
When i created a new file which wouldn't ever consider the BYZANTINE folder at all, it loaded the right constants and worked without any problems.
So did i just do any mistakes with #load-if?
- Attachments
-
- Promi 0.95.rar
- Just for testing purposes, far from being finished. :>
- (26.54 KiB) Downloaded 331 times
- ER
- Waheguru
- Posts: 2764
- Joined: Sat Nov 08, 2003 9:23 am
- Location: Johannesburg, South Africa
Re: Promi 0.9
2 things (I think...)
1. at parsing time the engine loads all the code. There is also a problem with defconsts that are not in the top-level of code. Try putting your defconsts all in one file (either the very top-level file or the first lower-level file that gets called/loaded), with the #load-if-defined statements around each set of constants.
2. similar looking errors (ie at a line number for no apparent reason) can also be caused by the old aiedit program by Stoyan Ratchev (?) that some people still use - it has a bug in it that causes random errors to appear)
1. at parsing time the engine loads all the code. There is also a problem with defconsts that are not in the top-level of code. Try putting your defconsts all in one file (either the very top-level file or the first lower-level file that gets called/loaded), with the #load-if-defined statements around each set of constants.
2. similar looking errors (ie at a line number for no apparent reason) can also be caused by the old aiedit program by Stoyan Ratchev (?) that some people still use - it has a bug in it that causes random errors to appear)
- marathon
- Waheguru
- Posts: 1984
- Joined: Fri May 14, 2010 2:30 pm
Re: Promi 0.9
You can try making 2 rows of #load-if rules. The first row should load constants. The second one should load files with rules.
You can use load-percent.
I am actually suggesting you to cut your files into constants and rules, then load all constants first and then all rules. You can do it like ER suggested, it's simpler. But my way you can use load-random in the future if you have multiple strategies per civ.
ATE uses load-random. Check it out.
You can use load-percent.
I am actually suggesting you to cut your files into constants and rules, then load all constants first and then all rules. You can do it like ER suggested, it's simpler. But my way you can use load-random in the future if you have multiple strategies per civ.
ATE uses load-random. Check it out.
- Promiskuitiv
- Waheguru
- Posts: 1364
- Joined: Thu Nov 10, 2011 1:07 pm
Re: Promi 0.9
I did it like ER said and it works now, ty for that!
Marathon, what does load-percent do and how do i use it? It's not described in the CBSP :/
And i'm also not quite sure what you mean by cutting my files (probably because of my lacking english skills : D). :>
And what about 2 rows of #load-if rules?
I don't want to bother you, so just answer if i don't
And about the load-random, i know how it works but can it really be good if it's random?
PS: Marathon i just looked into your LADE script (wanted to see what you were telling me) and while i was scrolling there i saw that you've got a FC market strategy, is it worth it to sell wood to get to castle-age a bit earlier?
PPS: Marathon, where are you from (Just saw your "Neue TSA" file )? :>
Marathon, what does load-percent do and how do i use it? It's not described in the CBSP :/
And i'm also not quite sure what you mean by cutting my files (probably because of my lacking english skills : D). :>
And what about 2 rows of #load-if rules?
I don't want to bother you, so just answer if i don't
And about the load-random, i know how it works but can it really be good if it's random?
PS: Marathon i just looked into your LADE script (wanted to see what you were telling me) and while i was scrolling there i saw that you've got a FC market strategy, is it worth it to sell wood to get to castle-age a bit earlier?
PPS: Marathon, where are you from (Just saw your "Neue TSA" file )? :>
- THE RULER
- Guru
- Posts: 655
- Joined: Sat Feb 20, 2010 10:55 am
- Location: FRG
- Contact:
Re: Promi 0.9
Marathon, where are you from (Just saw your "Neue TSA" file )? : that's
-- sorry for this post
using market for adv age: sell stone so you have no more , sell wood so you'll miss it - up to you !
-- sorry for this post
using market for adv age: sell stone so you have no more , sell wood so you'll miss it - up to you !
It's poison and it's blood and big fire, big burn - into the ashes and no return