Announcement

Collapse
No announcement yet.

CSPL: Towards a new Macro-Language?

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

  • #16
    Some more ideas:

    1) An event that allows you to exchange and\or combine unit roles:

    @IF
    xxxxxx
    @THEN
    ChangeRoles
    unit=xxxx
    from=##
    to=##
    (and=##)

    2) Load graphics and\or events files without having to use a batch file:

    @IF
    Turn=x
    @THEN
    LoadGraphics
    file=xxxxxx.bmp
    (or)
    LoadEvents
    file=eventsx.txt
    "If you are not confused by quantum physics, then you haven't really understood it." -Niels Bohr
    "The true test of your character is what it takes to stop you." -Dr. Bob Jones Sr.

    Comment


    • #17
      Originally posted by Alex Woehr
      Some more ideas:

      1) An event that allows you to exchange and\or combine unit roles:

      @IF
      xxxxxx
      @THEN
      ChangeRoles
      unit=xxxx
      from=##
      to=##
      (and=##)

      2) Load graphics and\or events files without having to use a batch file:

      @IF
      Turn=x
      @THEN
      LoadGraphics
      file=xxxxxx.bmp
      (or)
      LoadEvents
      file=eventsx.txt
      That may be possible with the existing library, the only problem is that one would have to reload the game to get the changes.

      On your first change, it would have to be exacted every time the scenario loads because it wouldn't save the changes to the file.

      Comment


      • #18
        Bad news...
        Unfortunately DarthVeda discovered that Attack thread doesn't work as expected when used in (minimally) complex events.
        This means that probably, with this version of the library, all events triggered by UnitKilled events couldn't be realized (There's the risk that CSPL catch 1 battle for each 10/100/1000 and this is not something you want to use in your scenarios)
        A possible temporary solution could be to find a way to make CSPL get/set Tot events Flags, in this way you could use standard events (and standard UNITKILLED trigger, sadly no enhanced version ) to interact with CSPL events but this will require a library update.

        1) An event that allows you to exchange and\or combine unit roles:

        @IF
        xxxxxx
        @THEN
        ChangeRoles
        unit=xxxx
        from=##
        to=##
        (and=##)

        2) Load graphics and\or events files without having to use a batch file:

        @IF
        Turn=x
        @THEN
        LoadGraphics
        file=xxxxxx.bmp
        (or)
        LoadEvents
        file=eventsx.txt
        Alex, i'm afraid i've not fully understood your first event, what is unit role? i guess it's somewhere in the rules.txt and if it's so...

        DV is right, the problem here is that i need to find where Tot places binary bitmap data from bmp files and currently i've no idea about their memory location.
        The first event probably is easier (but just because rules.txt is easier to find in memory since it's text) but it anyway requires a library update (to insert correct memory addresses)

        Thank you for your help, this thread will be very useful.

        Greetings,
        Angelo
        "If it works, it's obsolete."
        -- Marshall McLuhan

        Comment


        • #19
          The only thing I can suggest is taking enormous emounts of time going through ToT with a debugger seeing where in memory the rules are stored once loaded. But I doubt this would even be possible.
          I refute it thus!
          "Destiny! Destiny! No escaping that for me!"

          Comment


          • #20
            I like the idea of relative positions for creating unit events,
            like this: the Borg has been assimilated a unit.
            The new Borg unit should be created at the same position as the killed defender.

            Comment


            • #21
              If only that attack thread worked... d'oh

              Comment


              • #22
                Originally posted by Goingonit
                The only thing I can suggest is taking enormous emounts of time going through ToT with a debugger seeing where in memory the rules are stored once loaded. But I doubt this would even be possible.
                This is exactly how i wrote CSPL
                (Well, really speaking i did a tool to search patterns through TOT memory to save my time...)

                Originally posted by Thoddy
                I like the idea of relative positions for creating unit events,
                like this: the Borg has been assimilated a unit.
                The new Borg unit should be created at the same position as the killed defender.
                I like it too, let's hope i'll find a way to fix attack thread

                Greetings,
                Angelo
                "If it works, it's obsolete."
                -- Marshall McLuhan

                Comment


                • #23
                  Wish list - Mostly reprinted from "Firaxis, why didn't you include this sort of thing in Civ3 - Part 24" or somesuch similar name.

                  Apologies in advance if any of this is already possible with CSPL. I'm still learning. Some of it has already been mentioned above too.

                  *
                  I'd like to add the ability to locate a unit on the map as well, ie: with a (eg) triggerattacker/unitkilled set by a particular unit, that units co-ordinates can be identified and used in the followup effects.

                  Plus, please fix triggerattacker so that it resets after the event and doesn't remain locked for the rest of the game - ala the Verne scenario in FW

                  Also it would be nice to be able to alter unit statistics or city improvements through events, rather than having to save, exit, run batch-file, load save.
                  ie: researching depleted U shells or somesuch can add 1 to attacking values of arty, armour etc, or techresearched=invisibility gives all/selected units for a certain civ the tot "invisible until attacks" flag on.

                  Basically - Add in every possible flag/trigger/conditional that you can think of, and then think up new ones and add them too!
                  *

                  And

                  *
                  Actions :-

                  CREATE/DESTROY RESOURCE would be absolutely invaluable in an events file with the importance of strategic resources

                  CHANGE OWNER for units/cities - used to represent defections/rebellions etc. (also allow the barbarian flag for these - ie: units going "rogue").

                  MAKE PEACE/ALLIANCE - Similar to current MAKEAGGRESSION (only the other way around ) - highly useful for changing the political climate in scenarios without negotiation permitted.

                  INCREASE/DECREASE POPULATION - To represent special events/attacks on cities


                  Triggers :-

                  UNIT ATTACKED - to enable special effects BEFORE combat resolution and to possibly invalidate combat resolution.

                  CITY ATTACKED - Same as above


                  Conditions :-

                  IMPROVEMENT/WONDER PRESENT - Associated with CITY ATTACKED above. Effectively a flag for special effects if a certain improvement/wonder is present in the particular city attacked.

                  UNITKILLED - Allow this condition to enable if a unit is killed by a special (ie: nuclear) attack. Currently (civ2/ToT) nuclear attacks do not enable UNITKILLED.

                  OR Statement - Enable this for TRIGGERATTACKER UNIT= or OWNER= such that near identical events do not have to be completely repeated for different units/civilizations, thus freeing up valuable event space.
                  *

                  Comment


                  • #24
                    what about a CSPL for MGE?

                    Comment


                    • #25
                      Originally posted by DarthVeda
                      That may be possible with the existing library, the only problem is that one would have to reload the game to get the changes.
                      Last week when I was working on my scenario I saw something interesting:
                      Without reloading a saved file, Tot has updated several changes at the rules.txt(improvement costs, movementpoints) I made when testing the scen.
                      But this update did not happen every turn.
                      So it could be possible to activate this routine at every turn by an patch or so. Then you can use a change
                      *.txt or *.gfx event.

                      Additional my questions are: Has anybody seen this before.
                      Who knows a program that can check this access(log accesstime).


                      Another Trigger ideas
                      @IF GOODIHUTtipped
                      @

                      events

                      -create goodihut

                      -found city
                      (absolute/relative coordinates)
                      civ=
                      size=
                      improvents=0,1,...

                      -changeterrain
                      options=irrigation,mine,airport,road,RR,pollution,
                      dont affect cities

                      -sell improvement
                      city=x or all
                      civ=

                      option to all events
                      affect player=human, AI, humanor AI

                      Comment


                      • #26
                        Any news to report Angelo?

                        Comment


                        • #27
                          He passed his Electronics exam!
                          El Aurens v2 Beta!

                          Comment


                          • #28
                            Originally posted by Boco
                            He passed his Electronics exam!
                            Just to surrender and fail in the other one...

                            News: still nothing to report, probably the macro language will have an XML syntax (so i don't have to write a buggy parser from scratch but i can re-use a stable one);
                            but i've still have to investigate the structure of the language.

                            Basically we need :
                            -User defined variables
                            -Logic operators to use with multiple triggers (AND,OR,NOT)
                            -Multiple actions in action section

                            I'm trying to find a way to manage these in XML in an easy way (the whole thing will be useless if the language is more difficult than using C/C++ directly...) without writings tons of tags

                            Greetings,
                            Angelo
                            "If it works, it's obsolete."
                            -- Marshall McLuhan

                            Comment


                            • #29
                              I don't know what that all means, but I want to express my support and encouragement!
                              Tecumseh's Village, Home of Fine Civilization Scenarios

                              www.tecumseh.150m.com

                              Comment


                              • #30
                                *bump*

                                Anything new on this project? Like many other people CSPL has got me very interested lately but its bit hard to learn. Has there been any scenarios published using CSPL scripts so far btw?

                                Comment

                                Working...
                                X