December 29th, 2018, 13:29
Posts: 5,010
Threads: 17
Joined: Aug 2016
Could we add in a feature that if you reject a prisoner, you get half the gold that was budgeted to that prisoner for the treasure? That way if we do any changes to add different heroes, it isn't so much of a loss to reject them?
Also, someone else please comment on champions in lairs! We know my opinion on heroes is not going to be useful here
December 29th, 2018, 13:50
(This post was last modified: December 29th, 2018, 15:31 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
I second that, I would like to hear more opinions before adding such a feature. There are 3 2 possibilities to pick from :
-Champions never available
-Champions available for same budget as nonchampions, but turn limit makes sure they appear late anyway
-Champions available for higher budget, but if found before the turn limit for the earliest one, gets demoted to normal hero.
Refund of budget... Probably possible. I think space was very tight here though. Wait, no this only determines if a hero is available. Whether the player accepts or refuses comes much later. Still the same segment but there we also need to look up what type was generated and award the money separately which takes a lot more space. So overall I'm leaning towards "can't be done" and even if possible the player would not know about receiving the money.
December 29th, 2018, 13:52
Posts: 5,010
Threads: 17
Joined: Aug 2016
I was thinking IF possible, something like a pop up after the hero is rejected that says 'the hero gives you x gold out of gratitude to being rescued'. But yeah, doesn't sound doable. That's too bad, but overall shouldn't be a problem.
December 29th, 2018, 15:31
Posts: 10,496
Threads: 395
Joined: Aug 2015
Actually, it's not possible - the prisoner byte also contains other information so hero type is only a single bit. Sorry for the confusion.
December 30th, 2018, 12:27
Posts: 441
Threads: 4
Joined: Apr 2018
On ships, how about:
1. allow units with 0 movement to be selected, but making it so that if there's a unit with 0 movement then the stack doesn't move...
2. ... unless there's a ship with it, then only the selected units move rather then the entire stack like now...
3 ... unless some units would drown then don't allow the movement (or auto-select them for movement)
That's basically your load/unload flag right there. Also it is already like that with cities, and it works well, so this change actually makes the move function coherent.
December 30th, 2018, 13:05
(This post was last modified: December 30th, 2018, 13:07 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
Do we even need move 0 units to be able to get moved by the ship? I think not. The units don't spend move points when transported, so you can't end up that way unless you are abusing the ship to move a unit that shouldn't be able to move anymore.
In that case, it would be transformed into :
1. Always the selected units move and nothing else.
2. Unless, if that results in a unit that would drown, the stack cannot move.
For gameplay that means everything works as it already does, but we no longer have the "0 move unit gets transported" problems, and none of the implicit transportation madness happens. It essentially is the load/unload function - selecting the ship and the units, moves that ship and those units.
A perfect solution that wouldn't have been possible while ship transport consumed movement points on nonpatrolled units. Nice!
For coding, it means the following :
1.In the "units that actually move" procedure, the ship related special rules should not apply anymore to human players. I might want to keep them for the AI to make sure the AI doesn't end up stuck if it gives incompatible movement orders. This should be reasonably easy to do.
2.We need to implement a new procedure that can tell apart safe and unsafe ways of splitting the stack and for unsafe, make the previous "units that move" procedure return no units. This is extremely complicated - we need to check the units left behind for being transports themselves, or having a windwalker, then each unit individually for all different possible flight, noncorporeal or water walking type effects, including equipped items.
In short, this actually can be done o_O assuming I manage to code that procedure and manage to squeeze it into the available space. Next year. I expect this to be like 500+ lines of new code, at minimum.
...except. There is one major problem I've noticed. The units being selected means, you can't patrol them. Which means, you lose the ability to automove your ships. You can ofc still click on the destination but as soon as the ship is out of moves for the turn, the remaining units are still waiting for a move order. You have to press done for them, which makes them end the turn with no order. (Or not, in worst case they know they have a move order, but it's impossible to execute - they can't move on sea without the ship - so pressing done does nothing. In which case you have to manually clear that order by either patrolling, or clicking the tile the units are on.)
Next turn, you have the ship with the go order, but the units don't have it - so the game sees the ship trying to move alone leaving the other units behind. That's not allowed so the movement fails and nothing happens - but these orders aren't cleared from the unit. So the game tries to automove the stack again, and again and...you get the point, the game freezes. Even if the loop breaks somehow, you end up with the stack not following the move order anymore.
I think that's a bad enough problem (even if not freezing just being unable to move the stack without reissuing the order every turn) that we can't implement this until we solve that first.
...oh wait, units that just boarded the ship might have 0 moves left, it's not always units that used it up during battle. Arrgh.
Oh well, it was a nice idea, but sadly the problem seems to be too complex to solve without the load button afterall.
December 30th, 2018, 14:58
(This post was last modified: December 30th, 2018, 15:04 by Bahgtru.)
Posts: 441
Threads: 4
Joined: Apr 2018
(December 30th, 2018, 13:05)Seravy Wrote: Do we even need move 0 units to be able to get moved by the ship?
[...]
...oh wait, units that just boarded the ship might have 0 moves left, it's not always units that used it up during battle. Arrgh.
Oh well, it was a nice idea, but sadly the problem seems to be too complex to solve without the load button afterall.
Yes, of course - units just loaded typically have 0 or 1 MPs, and ships can still move. That's why the suggestion is: adopt the "movement out of a city" model for all movement.
The needed changes:
1. units with 0 mps can be selected;
2. on move attempt, you check if there's a 0 MP unit and/or a ship;
3. on move attempt, if there are unselected units, you need to check for drowning.
Result: the units being selected is the functional equivalent of a load button.
This results in something very intuitive: the stack doesn't move so the feedback is immediate, unless there's a ship then the entire stack moves - unless something drowns so it doesn't, again immediate feedback. It also makes movement coherent between in and out of cities.
Are the needed changes doable?
Your two points:
- patrolling: yes, patrolling doesn't work anymore on ships after this. Is it an issue? Apart from the trick of seeing one square farther away with a scout unit that patrols moved by a ship - that I consider borderline cheating anyway - I don't think any mechanic is lost. On the plus side, one can now set to patrol a unit in a city after the movement is finished rather than wait a turn (and maybe forget)
- entire stacks with a move order: shouldn't be an issue, on land at least an entire stack with an unfinished move order but some units at 0 MP ignores units that have movement left, check it out: you don't have to click done or anything. The only doubt I'd have is what happens when 2 ships combine, but I wouldn't trust that now either ![smile smile](https://www.realmsbeyond.net/forums/images/smilies/smile2.gif)
On the following turn of course the entire stack still has the move order. I don't get that.
An advantage: I believe that you recently did some code to check for drowning, so maybe there's something that can be reused or modified. Or was it an attempt that you didn't manage to do?
December 30th, 2018, 15:22
Posts: 10,496
Threads: 395
Joined: Aug 2015
Quote:- entire stacks with a move order: shouldn't be an issue, on land at least an entire stack with an unfinished move order but some units at 0 MP ignores units that have movement left, check it out: you don't have to click done or anything. The only doubt I'd have is what happens when 2 ships combine, but I wouldn't trust that now either smile
On the following turn of course the entire stack still has the move order. I don't get that.
Let's say you have a Trireme loaded with 3 spearmen. You want them to go somewhere so you click that tile.
The stack moves 3 tiles. Then the ship is out of movement. The spearmen all have 2 movement remaining - being carried by the ship costs none. You can't end your turn - the Next Turn button isn't visible while you have units that can move. They'll get autoselected over and over again. There are two cases when a unit doesn't get autoselected : if it's on Patrol, or if it has zero movement remaining. Setting them on patrol obviously clears the movement order. To run out of movement, you have to press the "done" button at a time they have no actual movement order already assigned - otherwise the button means "continue the existing order" which does nothing since they can't move without the ship. (In worst case if you are moving on land, they might leave the ship and go alone.) This means you have to clear the movement order yourself. Either way, you can't end the turn with the unit having their movement order.
That starts the next turn with a stack that has a ship trying to move without the other units, which fails. Either the game freezes as it tries to keep doing that, or if we are lucky and it does not, you still have to reissue the movement order.
December 30th, 2018, 15:41
(This post was last modified: December 30th, 2018, 15:42 by Nelphine.)
Posts: 5,010
Threads: 17
Joined: Aug 2016
Right but on land it doesn't work that way. Take 2 bezerkers, move 1 square to join a third, then tell the whole stack to move 10 squares. You don't have to tell the third one done, or patrol it. It just doesn't get autoselected, and so the whole stack moves together.
Is there something that prevents that for ship stacks?
December 30th, 2018, 15:53
(This post was last modified: December 30th, 2018, 16:16 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
Wait, let me actually test it, I'm getting confused.
...you're right. But I remember having to do that whenever I use a ship...
Oh I get it. When it's a ship, I don't select the other units (there is no need to) so they get autoselected because they never had the move order in the first place.
...no, it's not that. For some reason, ships behave differently. They do require you to press done even though other movement does not. Weird.
If I had to guess, it might be when the ship drags the unit along, it cancels their order or something? Well, not where the units that move are determined, but then where?
|