Announcement

Collapse
No announcement yet.

new orders

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

  • new orders

    I have opened this thread on the behalf of lacutos

    Well the past few weeks I have been very busy on my scenario and in my scenario I have a unit called a siren (named after the ones who killed ships with there call in ancient mythology)

    And I was trying to make some new orders so here is my first one
    Code:
    HandleEvent(AssassinateRulerOrder) 'supertremer' pre
    {
    
    location_t	tmploc;	// killsallland
    int_t		i;
    int_t           tmpplayer;
    city_t          tmpcity;
    int_t           tmpcitypop;
    int_t 		T;
    int_t 		numunits;
    unit_t		tmpUnit;
    
    	GetCityByLocation(location[0], tmpcity);
    	    numUnits = GetUnitsAtLocation(tmpcity.location);
    		    for (i = 0; i < numUnits; i = i + 1) {	// Kill all units
    			    GetUnitFromCell(tmpcity.location, i, tmpUnit);
    			    Event: DisbandUnit(tmpUnit);//should kill all units don’t work so good
    			}
    	AddEffect(location[0], "SPECEFFECT_CREATE_PARKS", "SOUND_ID_NANO_TERROR");
    	tmpplayer = tmpcity.owner;
    	Event:Killcity(tmpcity, 0, tmpplayer);
    	Terraform(location[0], 23);		// Transform the city into sea
    	for (i = 0; i < 7; i = i + 1) {
    	t=i-1; 
    	GetNeighbor(city[0].location, t, tmpLoc);
    		Terraform(tmploc, 23);		// Transform sea
    			}
    			return STOP;
    		}
    its called super tremor which basically kills an enemy city and replaces it with a lake

    it’s a work in progress and the one I have at home has evolved a bit more

    the only problem is with the disbanding of units and if there is a river there

    it basically hijacks the old assassinate order which I did not use much all you basically have to do after this is change the assassinate special effect and pics (using the read zfs program)

    so locutos what do you think of that
    "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
    The BIG MC making ctp2 a much unsafer place.
    Visit the big mc’s website

  • #2
    Well now...

    Firstly I would suggest using KillUnit(tmpUnit) instead of DisbandUnit. Disband only works if you own the unit I would think.

    Up to there should then be fine.

    Then in Event:Killcity(tmpcity, 0, tmpplayer); I think the integer in the middle woud be the city index, not sure. Try -1 to make sure the capitol doesn't get wasted by accident.

    Terraforming the city tile, is that shallow water or beach?

    Lastly, this for loop is a bit confused/confusing
    Code:
    for (i = 0; i < 7; i = i + 1) {
    	t=i-1; 
    	GetNeighbor(city[0].location, t, tmpLoc);
                    Terraform(tmploc, 23);	// Transform sea
    }
    return STOP;
    Why not do a loop in t?
    Code:
    for(t=0; t < 8; t = t + 1){
    There are 8 tiles around the city, numbered 0 to 7, so that loop will get them all. Then use GetNeighbor, and Terraform.

    Is the return STOP necessary to prevent the ruler actually being assassinated?
    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


    • #3
      I fix the problem with the Terraform


      And I will try the kill unit thanks for the advise

      They are automatically killed when you Terraform but it’s just way to slow and it look ugly

      The stop stops the action. it is what stops you disbanding armies in the magnificent samurai scenario

      Why don’t you plug the code into a slic file and run it for your self so you can get to grips with it
      "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
      The BIG MC making ctp2 a much unsafer place.
      Visit the big mc’s website

      Comment


      • #4
        So what you actually do is add new effects to the existent orders and/or remove the old effect.
        This will open new horizons.
        But cant we add totally new orders!
        "Kill a man and you are a murder.
        Kill thousands and you are a conquer.
        Kill all and you are a God!"
        -Jean Rostand

        Comment


        • #5
          I have been looking in to this for some time now and the only way to get the orders to look like anything activson has done is to hijack one of theirs. The only other possible way is the civ 2 way by pulling up msg boxes with orders in but I could never get that to work with a unit that could attack and have a special order.
          "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
          The BIG MC making ctp2 a much unsafer place.
          Visit the big mc’s website

          Comment


          • #6
            Well I have addressed one of the problems with the order it now works for underwater citys.

            In the week end I will adders the two other problems air units and navel units survival

            And the destruction of tile imps under the sea

            but here is the latest version anyway
            Attached Files
            "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
            The BIG MC making ctp2 a much unsafer place.
            Visit the big mc’s website

            Comment


            • #7
              Well I thought as my thread slowly sinks I might tell you lot about some of the new ordes I am making.

              Rob bank

              Well does basically what it says

              (every time I think of Thais I get this picture of Michael Kane saying “your only suppose to blow the ******* doors of)”

              planet weather control devise

              which basically covers the enemy civ city in a blanket of snow.

              Terror hack

              The concept found I the English folder provided

              In the call to power 2 CD by activsion

              The enemy civs research is set back and unhappiness happens in the city you targeted.

              Planet gaia bomb

              Basically the same as the create park but also cleans up any dead tiles

              And burn

              Which destroys what ever the enemy civ is making and there is a chance of the fire spreading and the city loses of population, buildings etc
              "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
              The BIG MC making ctp2 a much unsafer place.
              Visit the big mc’s website

              Comment


              • #8
                What about ...

                Bribe

                As in civ2, when you use it in another civ unit this unit join your empire (also lows regard)

                Suicide Bombing

                The unit dies but kills all the army wich this order was used. Should also kill pop when using in a city.

                Throw Party
                This one already exists but what about redo all thing so that modders can have more control over how much will be spent and how regard will be increased.

                Sell / Export
                Just like sell indulgence but used by coporate branchs to give gold.
                Last edited by Pedrunn; April 17, 2002, 19:02.
                "Kill a man and you are a murder.
                Kill thousands and you are a conquer.
                Kill all and you are a God!"
                -Jean Rostand

                Comment


                • #9
                  now that’s more like what this thread was set up for here what i think may be good wrong with you orders

                  Bribe

                  Makes the game a bit to easy

                  but would probably work OK easy enough

                  Suicide bombing

                  I had this idea a while back using one of the planes as a demolition plane then I got to sept 11 and thought twice about it.

                  Throw party

                  Could be good like bronze, silver , and gold party use 100, 200 or 300 gold easy to do if you ask me.


                  Sell/ export

                  Is this not done with the trade manger
                  Could be a good way of stimulating an underground dark goods trade.

                  I am very interested in the throw party idea expect the code soon.
                  "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                  The BIG MC making ctp2 a much unsafer place.
                  Visit the big mc’s website

                  Comment


                  • #10
                    Throw Party,
                    I wont use it kwon but for sure i will use it for sure. If have time i would love this code to my almost released mod (Absolute State v2.0).

                    Bribe,
                    i love the idea of civ2 but for sure we would have to add some difficulties like percent of chance of achiving (lows regard if fails), cant do if a unit belongs an army and costs a lot of money. It is something great that i will for sure use it.

                    Sell/Export,
                    Economy is the main column of a civ/nation. I just love if we have more emphasis on it even the the field. I think will be nice to have a little discussion about it before make the code.

                    Suicide Bombing,
                    Cool to make a terrorist type of unit. And civs with it would have really low regard towards others civ.
                    "Kill a man and you are a murder.
                    Kill thousands and you are a conquer.
                    Kill all and you are a God!"
                    -Jean Rostand

                    Comment


                    • #11
                      Really cool idea!!!!!

                      Rush Improvement
                      Like workers of civ3, while a tile improvement is being buit, you could geta a unit to stand over the imp and use this order wich will cost PWs (or money) to have the tile imp ready in the next turn. See IW's rush tile improvements code.
                      Last edited by Pedrunn; April 19, 2002, 09:26.
                      "Kill a man and you are a murder.
                      Kill thousands and you are a conquer.
                      Kill all and you are a God!"
                      -Jean Rostand

                      Comment


                      • #12
                        Originally posted by Pedrunn
                        Suicide Bombing,
                        Cool to make a terrorist type of unit. And civs with it would have really low regard towards others civ.
                        Actual this is already in the game see nukeswhy not giving such a suicide unit to the Barbarians and see what happen, another idea would be givinglet pop up a message if you meet a Barbarian unit for a small deal you give them some money for an attack on a forign civ, you have to pay the costs for the trip for to the target and maybe for some additional mercenaries. Whenever an AI meets an Barbarian they would pay them, too. Of course the deal will only happen if you have enough money and if the Barbarians might think you paid to less than they will make a surprise attack on you instead of your enemy.

                        -Martin
                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • #13
                          Originally posted by Pedrunn
                          Really cool idea!!!!!

                          Rush Improvement
                          Like workers of civ3, while a tile improvement is being buit, you could geta a unit to stand over the imp and use this order wich will cost PWs (or money) to have the tile imp ready in the next turn. See IW's rush tile improvements code.
                          Actual it would be easier to code if tile improvement would be finished once instaed of next turn.

                          By the way I would create new orders by using some of the obsolete slic events. For example look on this:


                          PHP Code:
                          ORDER_BUILD_FORT {
                            
                          Gold 0
                            Move 100
                            EventName 
                          "UseSpaceLadderOrder"
                            
                          GLHidden

                            LocalizedName str_ldl_order_move
                            StatusText str_ldl_order_move

                            TargetPretest
                          :None
                            UnitPretest_None

                            CPIcon 
                          "upsi26.tga"
                            
                          ButtonLocation 0
                            DefaultIcon ICON_ORDER_MOVE
                            
                            Cursor 1
                            InvalidCursor 2

                          Everytime when this order is called the UseSpaceLadderOrder event occurs in the game. Actual it does nothing but with this slic code it will build at the army location a fort:

                          PHP Code:
                          HandleEvent(UseSpaceLadderOrder)'MG_BuildFort' pre {
                          Event:CreateImprovement(army[0].owner,army[0].location8,);

                          Now a new goal for the AI like this one, for the goals.txt:

                          PHP Code:
                          GOAL_BUILD_FORT {
                            
                          NoTransport  

                            SquadClass
                          :CanAttack
                            SquadClass
                          :CanDefend
                            SquadClass
                          :HasZoc

                            TargetType
                          :ChokePoint
                            TargetType
                          :Border
                            TargetOwner
                          :Self
                            TargetOwner
                          :Neutral

                            Execute    ORDER_BUILD_FORT

                            ThreatBonus          100
                            EnemyValueBonus            0
                            AlliedValueBonus            0
                            PowerBonus                0
                            DistanceToHomeBonus      
                          -10 //WW from -100
                            
                          DistanceToEnemyBonus       -1
                            ChokePointBonus           10
                            UnexploredBonus         
                          -999999
                            ObsoleteArmyBonus          
                          -50
                            TreaspassingArmyBonus      500

                            ThreatenType
                          :None
                            ThreatenBonus 0

                            ForceMatch
                          :Defensive

                          Now add the proper lines to all strategies in the strategies.txt something like this:

                          PHP Code:
                          GoalElement Goal GOAL_BUILD_FORT          Priority   100000  MaxEval   3  MaxExec   2 //MG added 
                          So now the AI is able to build some forts on the map with the notion that it is doing something for its defence. By the way as a side product it makes possible that the player can put forts over the orders pad on the map of course only if you change the button location in the orders.txt note that the current version should be added in front of the whole code of the orders.txt so that the button lies under the button for move in this example so that the button doesn't lie on more improtant orders.

                          -Martin
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment


                          • #14
                            What about conscription? (if it doesn't exist already in a Mod I'm not playing), the concept being similar to creating slaves, but forcing the captured units/pop to become your military units.
                            "Guess what? I got a fever! And the only prescription is ... more cow bell!"

                            Comment


                            • #15
                              Well I am back thanks to the wombat

                              Looks like there are some good ideas floating around

                              I got the bank raid working in my small absents (college banned apolyton but I got around it)
                              Expect it Monday

                              And I almost got the throw party to work problem is I am having a hard time pulling up the need stuff in a text box. All I need to get it working is directions on getting the target city owner up in my mc_msg.slc box.
                              "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                              The BIG MC making ctp2 a much unsafer place.
                              Visit the big mc’s website

                              Comment

                              Working...