 |
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Hello 
Welcome to the frustrating world of CTP2 scenarios 
quote:
POPULATION CONTROLS
*Specify starting FOOD, varies per Civ
|
I don't understand what you mean. You can set tile improvements in the scenario editor, and you (should) be able to add and delete them via SLIC...
quote:
*Population caps: Civ1 = 20, Civ2 = 40
(no further growth allowed)
|
That is relatively simple SLIC. (I think). Just whenever a city owned by civ1 grows, kill it back one. I need this code for a scenario I am helping a friend with.
quote:
*Assign Civ2 cities a starting # of SLAVES.
Max 5 citizens per city. Any over #5 is
ALWAYS a slave, PERIOD.
|
There is no way of doing this directly, but you can set up at the start of the scenario an invisible event where a slaver captures settlers and sends them to their cities.
You could also play through the first few turns, enslave some slaves to civ1 cities, then reset the unit locations, and game turn and re-save it as a scenario.
The SLIC would be complicated, and I think Dale would know best how to do it.
The only way in which (the documented) SLIC deals with slaves is by capturing or freeing. To implement the second part of that, you would need to, every time the city grew, kill the new pop, create a settler and slaver, enslave the settler and kill the slaver again afterwards, making sure the slave went to the right city...
quote:
GAMETIME TRIGGERS
*Learn an Advance at X turns
|
easy SLIC
quote:
*Remove a building from Civ2's capitol at X turns
|
Easy SLIC
quote:
DEFEAT CONDITIONS
*Cease-Fire
|
SLIC-able...
quote:
*Civ2 pillages 5 Tile Improvements at XY coords.
Also need to know how to make this a Civ2 goal.
|
Possible, I should think, but what if Civ1(?) replaces them after being pillaged?
quote:
VICTORY CONDITIONS
*Revolution in any Civ2 city 
|
Should be possible...
quote:
*Complete X turns (how many total are allowed?)
|
Yep, that too can be done. (SLICked)
quote:
JUST BECAUSE
*Specify city icons per civ, including which size
city to display regardless of Age or population
|
Can't be done by SLIC, because it can only read the textfiles, not alter them to change the graphics. If by icon you mean the graphic displayed in the game, you can easily change that, in agecitystyle.txt I think. Just find for each style (roman, asian, arab) which one you want, and copy it in the place of the others for each age and size.
Good luck though! If you want to learn SLIC then even more good luck to you! If you want me to do some for you, then I will look at it, but I am busy 'til the end of August I'm afraid 
|
|
|  |
 |
|
Fidel
|
 |
Havana
Jul 2001 time: 00:14
|
|
quote: Originally posted by Immortal Wombat
whenever a city owned by civ1 grows, kill it back one. I need this code for a scenario I am helping a friend with. |
Could you please share it when it's ready?
[/QUOTE]
Good luck though! If you want to learn SLIC then even more good luck to you! If you want me to do some for you, then I will look at it, but I am busy 'til the end of August I'm afraid [/QUOTE]
I'd really appreciate that. As for the part you didn't understand, forget it. It was one of those "did I say that out loud?" kind of things. I was actually making a note but I put it in the message instead. Gimme a break, it was the wee hours. 
Doh! I didn't think of just playing a slaver for a few rounds...that means all I'd need are population caps. I was kind of hoping the turn-based stuff was easy and maybe even already written...I'm not a programmer by any stretch of the imagination.
The city sprite thing looks like it's going to be a pain, but I can kind of see how it works, now that I know which files to look at. Come to think of it, that's half my problem right there...figuring out which file/variable does what. 
Do you know which TXT file to mess with to really the AI? They're not exactly the overwhelmingly powerful, studly conquerors they're supposed to be here. 
Anyway, I was making my notes in HTML so I may as well go ahead & publish it so you know what I'm talking about.
http://www.redlionpc.com/masada/
|
|
|  |
 |
|  |
 |
|
Fidel
|
 |
Havana
Jul 2001 time: 00:14
|
|
quote: That is an amazing scenario description. I've never seen a better website dedicated to a CTP2 scenario I think! |
Thanks! I was really just making an elaborate set of notes for myself so that all my pics & references would be in one place...but it did turn out kinda nice. :P Just keep in mind that it's still kind of like The Phantom Menace...it can't live up to its billing. 
quote: How did you make it so the units can only pas over that one bit? It lossk like something that could be done by changing the flag - MovementType: Mountain for the terrain, and units, but I can't see how any variation on that would result in that pathing line... |
I was wondering if anyone was gonna ask me that... Given the scenario, it was kind of a critical thing and it took me FOREVER to figure out . Some of those mountains and deserts aren't what they appear...in TERRAIN.TXT they're DEAD and GLACIER tiles with "MovementType: Air" ONLY. Then I changed both icon tags for each to display BROWN_MOUNTAIN and DESERT, respectively. For as much brain-busting as it cost me, it's a maddeningly simple solution.
quote:
Anyway, I'll take a look at the SLIC some time, and email you about it. I won't be able to test it, as it will probably require the correct set of text files, or the right map. (The download on the site doesn't work for me) |
You probably got a 404 didn't you? I killed the ZIP last night because I had to do a major rollback: some edit I made started crashing the game on every load. Of course I couldn't remember EXACTLY where it was so I had to dump default files back in. I'll put it back up here in a bit. Just remember that the TXT files are still subject to heavy alteration...the only thing I'm completely done with at this point is the map.
THE BIGGEST PROBLEM is the Romans are STILL completely ignoring Masada, and the frenzy mod doesn't seem to matter. From what I can tell I'd need the Romans to start off in FRENZY_MODE_4 but don't know enough about coding to make it happen. Also, it takes one each of my Roman cities and gives them to the Irish, Americans, Germans, etc. I pulled it out of the scenario for that reason alone. Maybe it can't work where there's only one AI?
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
Quote
---------------
The only way up or down is via that single mountain tile; try another way and your unit falls to its death
---------------
I thought you might be using MrOgre's 'location of death' handler for this. You might want to consider using it for at least a few of the more crucial locations: you should get get nice sound effects as the Romans fall from the cliffs. I'll have a think about it as soon as I get a copy of your map.
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
quote: Originally posted by Fidel
Impatiently looking forward to seeing it...you sent via email I suppose? Gotta love lag time... 
|
Actually, I was meaning to post it here, but then Apolyton went weird, and I couldn't post, so I never got around to it. Its attatched to this post... 
quote:
BTW for anyone who wants it at this stage, I have re-posted the ZIP. It's still under some rather serious revision, but you can at least look at the thing as a whole.
|
Cool. As long as the forts stay in the same place, the code should work.
I would avoid a location of death, because the Romans wont know how to handle it.
I think... that using the unhappiness code in the scenario.slc here, the AI will go into Frenzy_4 very quickly, if not straight away.
lol tut2_main.slc... Great file that one. Doesn't give the best impression of Activision though.
|
|
|  |
 |
|  |
 |
|
Fidel
|
 |
Havana
Jul 2001 time: 00:14
|
|
WOW, I didn't think you'd gone to that much trouble! Even endgame strings! 
A few Q's tho...
quote: TO IMPLEMENT THE TERRAIN IMPROVEMENT PILLAGING LOSS, FILL IN THE 23 LOCATIONS HERE |
Can I get by with defining the "target" spots only, or do they ALL need to be referenced???
quote: ...I can make the Romans hate the Hebrews... Maybe you could combine it with AI frenzy. |
I'll give Frenzy another shot...as long as no new civs suddenly appear it's cool. If they do, then I'll have to figure out how to deal with that. Maybe just erase 'em after they change civ and put the Romans back? In case you haven't noticed, I like to go for the easy edits first. 
quote: ...That is a disadvantage if you are likely to be counter-attacking, but I don't think that is the aim... |
Definitely not. I think I'm also going to try and see if I can't make the Hebrew-only units suffer health losses the further away from home they get. This should prevent or at least discourage leaving the rock. Does LossMoveToDmgNone deal with this (by changing None to a number, maybe)? The Hebrew-only units are already set so up so they can't pillage anything or capture cities.
Also...the @#&$*! editor wasn't SUPPOSED to be set on erase, but it erased Masada anyway when I clicked it. I rebuilt but now I can't put the CAPITOL back, either with the editor or by just buying it. It asks if I want to rebuild, I say yep and then it just doesn't work. Damn lemurs. 
Anyway, THANKS HEAPS!
|
|
|  |
 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:14
|
|
It's MrOrgre's (=Joe Rumsey, the head CTP2 programmer) example of how to add a handler for a named event. You can find it in the SLIC Events documentation but this is all there is to it:
code:
Example:
location_t location_of_death;
// ...
// set location_of_death to some square first
// ...
// This handler will kill every unit that enters a preset location of death
HandleEvent(MoveUnits) 'MyMoveHandler' post {
if(army[0].location == location_of_death) {
int_t u;
for(u = 0; u < army[0].size; u++) {
unit_t unit;
GetUnitFromArmy(army[0], u, unit);
Event:KillUnit(unit, 0, -1);
}
}
}
Wombat is right in that the Romans wouldn't know how to deal with it; if you were to surround Masada with a ring of these locations it would be truely impregnable. But I thought that maybe one or two at crucial points might be interesting. There must be some use for it.
IIRC, 'LossMoveToDmg' was supposed to be like in CIV2 where if a unit gets damaged in battle it loses movement points until it's healed. But I'm pretty sure it was never implemented: although I've never tried it myself, I don't recall ever seeing anyone else use it. Anyway, it's not really what you're after.
In theory, it's the goals mechanism that controls how units move around the map. So if you were to HUGELY prioritize the Hebrews GOAL_DEFEND in whatever strategy they have, that should keep them on the rock. It would also keep them from doing anything else but maybe all you really want them to do is defend and bombard.
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
quote:
Can I get by with defining the "target" spots only, or do they ALL need to be referenced???
|
You only need to define the ones which, upon pillaging will cause a Roman victory.
quote:
Does LossMoveToDmgNone deal with this (by changing None to a number, maybe)?
|
LossMoveToDmg(XX) does exactly the opposite. It limits unit movement depending on how damaged it is. There is also only one other LossMoveTodmg flag, I think it is 10, but Martin G compiled the list of .txt file flags, you should ask him.
quote:
Also...the @#&$*! editor wasn't SUPPOSED to be set on erase, but it erased Masada anyway when I clicked it. I rebuilt but now I can't put the CAPITOL back, either with the editor or by just buying it. It asks if I want to rebuild, I say yep and then it just doesn't work. Damn lemurs. 
|
Maybe if it is not too much trouble, you can change this by deleting everything on the map, saving it as a blank map, and putting everything back again. If you have just a few things there, then it wouldn't take too long.
quote:
Anyway, THANKS HEAPS! |
No problems. Debugging a stupid AI can get veeery boring sometimes 
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|