Announcement

Collapse
No announcement yet.

Bit off more than I can chew! Help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Dammit forgot again
    Attached Files
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment


    • #17
      WOW, I didn't think you'd gone to that much trouble! Even endgame strings!

      A few Q's tho...

      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???

      ...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.

      ...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!
      - Fidel

      Stubbornly refusing to accept the fact that Communism doesn't work.
      http://www.redlionpc.com/masada/

      Comment


      • #18
        Originally posted by Peter Triggs
        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...
        I don't know why but it doesn't do that anymore. When I first set it up you could tell the unit to attempt the impassable terrain and the unit would instantly die . It probably wasn't supposed to do what it did anyway...now it just won't let you go there. The terrain's being impassable was the critical part so I'm cool with it .

        I'd still like to look at the LOD sometime...it might come in handy for other historical scenarios. Where can I find it?
        - Fidel

        Stubbornly refusing to accept the fact that Communism doesn't work.
        http://www.redlionpc.com/masada/

        Comment


        • #19
          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.

          Comment


          • #20
            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.

            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.

            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.
            Anyway, THANKS HEAPS!
            No problems. Debugging a stupid AI can get veeery boring sometimes
            Concrete, Abstract, or Squoingy?
            "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

            Comment


            • #21
              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);
              		}
              	}
              }
              I would just add that to set the location of death requires the function:
              Code:
              MakeLocation(location_of_death, x, y)
              Where x and y were the co-ordinates you can find in the cheat editor.
              Concrete, Abstract, or Squoingy?
              "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

              Comment


              • #22
                Originally posted by Peter Triggs
                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.
                I'll give that a look, but since the Hebrews are the PLAYER'S civ, the idea was to restrict the range of any Hebrew Archer ambushes on single Roman Hoplites foolish enough to get too close. If I can get the AI to do its job, leaving the rock shouldn't be much of an option since you're SUPPOSED to be under siege! At the very least I'm going to try to prevent the Catapults from going anywhere...maybe set 'em to MovementType: Mountain only.

                I'm probably overthinking this...I may just say to hell with it and leave it alone.

                BTW for anyone who may have been having trouble with the site or the download, my ISP has been dropping my connection more or less at random all week... Just keep trying, it'll be back up ASAP.
                - Fidel

                Stubbornly refusing to accept the fact that Communism doesn't work.
                http://www.redlionpc.com/masada/

                Comment


                • #23
                  If I can get the AI to do its job, leaving the rock shouldn't be much of an option since you're SUPPOSED to be under siege!
                  This can work both ways, you can set the AI GOAL_SEIGE and GOAL_ATTACK very high. It really doesn't matter how much the Romans neglect their economy and science, you dont want them discovering gunpowder and slaughtering you in seconds...
                  If the AI concentrates purely on war it will make the game more fun.

                  Oooh, idea in personalities.txt it has a note saying never choose PERSONALITY_KAHN as a civ personality, as it is the barbarians one and affects the startegies they use. Now ususally I can see the point, but in this case, a barbarian AI with high aggresiveness is exactly what you want.
                  Concrete, Abstract, or Squoingy?
                  "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                  Comment


                  • #24
                    Forget what I said about GOAL_DEFEND; I've been struggling so long to get the AI to behave properly that I sometimes forget that there's human players involved in this game too.

                    Ben's idea about PERSONALITY_KAHN is definitely worth a look at. And it's a lot easier to implement (and unimplement) than most other things you could try. Maybe you'll find Roman troops (reinforcements?) popping up out of nowhere like the Barbs do.

                    Comment

                    Working...
                    X