Announcement

Collapse
No announcement yet.

Bug in mission queueing?

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

  • Bug in mission queueing?

    I don't know if anyone else played around with it but you can give units specific missions, like goto a location. And you can queue up these missions using the pushMission function.

    There's a problem however, and I'm not sure if it's a bug or if I'm not using it correctly (still not sure about all of this function's parameters)

    For a mod I'm working on now to automate missionaries I queue up two missions. the first is the goto event, to tell the missionary to goto a nearby city. The second mission is a spread event, to tell the unit to actually attempt to spread his religion.

    Queueing those jobs will work most of the time but if the unit runs out of movement pts RIGHT on the city he's supposed to convert, he never gets to complete the mission to attempt to spread his religion. It's like once the unit arrives the goto mission is done, and then it tries to immediately execute the second mission which is to spread. unfortunately, no movement pts left so he can't do it, but the job is removed from the queue anyway, so next turn he's standing there waiting for new orders.

    anyone know what I'm talking about?

  • #2
    I have yet to even peak at the python code yet (I've been too busy playing the game) and know nada about the API, but if this is the case, couldn't you just stack in there a Wait (Skip Turn) mission/command?

    1. Go to nearest city;
    2. Skip turn;
    3. Spread religion.

    Also, not to question your mod, but I assume this "queue" you speak of is automated, i.e., so what happens if the city in question already has that religion?

    Comment


    • #3
      That's a good idea but the only problem with that would be that if the unit makes it to target city using, say, half his movement pts- he's gonna skip his turn despite the ability to spread right away.

      I think I'm gonna try registering the automated missionaries and do a check on them on the beginning of the turn to check their orders and update them if they arrived at target city.

      Comment

      Working...
      X