Announcement

Collapse
No announcement yet.

Offer City Bug

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

  • #16
    Pedrunn,

    Yeah, I've created a proposal before. In one of the very first Diplomods there was a new proposal "Break Agreement". Yeah sure, 'some' of the coding was still there, but the rest I had to fill in. Unfortunately, there was a bug in it (can't remember the bug exactly) and I had to cancel it.

    But if you forum search on "diplomod" you should come up with something. I think it was v1.6???

    Comment


    • #17
      Pedrunn,

      BUG: It still there is an annoying thing: every time you choose any diplomatic offer a message will pop up asking about wich city you want to give when it should only do that when the offer city option is selected not the others.
      That's what I meant when I said that I couldn't manage to trigger on individual names, only on the list. I never could get any further than that.

      Re: Adding New Proposals

      The offer/request break agreement proposals are disabled:

      [MarkG] Ah! why was the break agreements diplomatic option disabled???

      [RichardM] MarkG, time constraints mostly. Diplomacy had plenty of features and the rules for how the AI should respond to break agreement proposals [were] not clear cut.
      and so are free to be used however we want. I used them for offer/request embassy proposals.

      More generally, I don't know if it's possible to add a completely new New Proposal. Each new proposal contains a Type variable which is described as:

      String name of a valid proposal type. These names are primarily used for debugging as well as SLIC scripting though they must be registered in the game to work correctly.
      Originally I thought these were just ordinary strings and was confused by the fact that I couldn't find a text file where they could be 'registered'. As I recall, something Martin said gave me an idea and I got a bit over-excited when I tried this:

      Code:
      HandleEvent(NewProposal) 'MY_NEW_PROPOSAL' post {
      
           message(1, 'Test_message');
      
      }
      
      // with
      
      PROPOSAL_MY_NEW_PROPOSAL {
          Type "MY_NEW_PROPOSAL"
          Title DIP_NONE
          Details0 { DetailsEven DIP_DETAILS_NONE_0 }
          Details1 { DetailsEven DIP_DETAILS_NONE_1 }
          Details2 { DetailsEven DIP_DETAILS_NONE_2 }
          Details3 { DetailsEven DIP_DETAILS_NONE_3 }
          Details4 { DetailsEven DIP_DETAILS_NONE_4 }
          DetailsEx0 { DetailsEven DIP_DETAILS_NONE_EX_0 }
          DetailsEx1 { DetailsEven DIP_DETAILS_NONE_EX_1 }
          DetailsEx2 { DetailsEven DIP_DETAILS_NONE_EX_2 }
          DetailsEx3 { DetailsEven DIP_DETAILS_NONE_EX_3 }
          DetailsEx4 { DetailsEven DIP_DETAILS_NONE_EX_4 }
          Image "updi01.tga"
      
      }
      It didn't crash (which it always did with previous experiments) and so I thought 'Aha! Proposal types are just the names of SLIC objects. We can add as many new ones as we want."

      Alas, no. I haven't been able to get any other Details except the null ones above. Maybe there's something simple that I'm missing: it looks like it's set up so that we should be able to add new proposals, but I haven't been able to do it.

      Comment


      • #18
        I have tried to create a new proposal.
        It appeared in the diplomatic screen but the slic just didnt recognize it.

        You may try to find some bugs in my coding. So here is the coding
        NOTE: if you unzip in the main CTP2 directory it will replace originals files.
        Attached Files
        "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


        • #19
          Can you use an existing "type" for new proposals? It wouldn't make sense, but if the types aren't really used, I can't see it mattering...

          Pedrunn, you have cut out the lines:
          Code:
          Arg1:OwnCity
          Reciprocal PROPOSAL_REQUEST_GIVE_CITY
          The first one I don't know what it does, but it seems like it might be useful. The second I think is more important - it's the proposal that the AI recieves. You make a "give" offer, the ai gets a "receive" offer. I dunno. It might make a difference.
          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


          • #20
            The proposal does not give nothing just the variation of regard. What gives the city is the Slic. So those lines arent needed. Thus i have tested the same code with using proposal #1 (changed the same way as the proposal in this file). And it did work. Yet I may test it again to make sure.
            "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

            Working...
            X