vaendryl / Sunrider

source code of the visual novel 'Sunrider'
http://sunrider-vn.com/
41 stars 21 forks source link

Introduce morale system #118

Closed DoumanAsh closed 9 years ago

DoumanAsh commented 9 years ago

Share your thoughts on this morale system. If you think it is worth and right thing to do then share what else would be good to have? For now i decided that morale should affect only evasion and accuracy. Not sure about dmg, though logically you cannot raise dmg with morale :D

EnderShadow commented 9 years ago

Now we just need Vaendryl's approval.

DoumanAsh commented 9 years ago

Doubt that will be case :)

vaendryl commented 9 years ago

sorry, I've been busy and did not notice this PR till now.

could you explain in some detail what this is supposed to do? I can tell enemy units will be getting accuracy and evasion buffs/nerfs but what's the deal with morale_up and morale_down? it looks to me if the morale is high the buffs keep on stacking ever higher and higher every time the function gets called - vice versa if it's low. what if we end up with an enemy unit that has so much evasion it's invincible?

I'm not too fond of this so far, truth be told. I like hidden mechanics but this seems too powerful to not tell the player about, and I don't look forward to tacking the UI issues involved. and that's disregarding what Sam will have to say about it.

vaendryl commented 9 years ago

after looking at it some more it seems it's not intended to stack - in which case the effect is fairly minor. I'll think on it a while.

DoumanAsh commented 9 years ago

For now i'm not sure to what amount these boosts should be. And of course if they will become something significant then player should be aware of these boosts but i'm not sure how exactly it should be told. For example player should be aware of morale boost/degradation of its own units, but it would be not logical to have some morale meter on enemy units :)

Generally i want to have units(both players and enemy) to have partly hidden morale system. With high morale units should be more effective while low morale lead de-buff I even had thought to add order for boosting morale but first we need to understand which effects morale should have

vaendryl commented 9 years ago

I like the basic concept, but I think what Scildfreja proposed is a lot more interesting. he talked about modifying the way AI works in such a way that lead ships give orders to nearby regular units - and by taking out the command ship the regular mooks panic, lose focus and act on their own. most likely by fleeing towards other lead ships or generally away from player units till they regroup.

for now though this is a decent stop-gap point.

DoumanAsh commented 9 years ago

I agree that Scildfreja's idea is good, but morale system would be nice addition to that :) For example high morale would make unit more offensive while low morale leads to more defensive way to act for AI. It could affect the chance to panic and etc :) But it should be done only when you'll finish with rewriting AI :)

vaendryl commented 9 years ago

thinking about it some more, something is troubling me a lot. the idea is cool and all, but it's REALLY unfavourable to bad players and very favourable to good players.

The nature of Sunrider is already that playing well means more money and more command points - making future battles easier. the worse you play the harder the game gets! this is the opposite of rubber band difficulty and generally bad game design. I know the kneejerk is 'fuck the noobs' but the noobs tend to be bigger part of the target market, which is one of the reasons 2RNG is in the game to help them out.

I'm okay with this addition, but only make it have an effect on hard difficulty or higher. probably best to do this by adding a difficulty check in the accuracy function, and make it not change the evasion directly.

DoumanAsh commented 9 years ago

Ok, i guess you're right about that. It's really bad of me(besides im such a cheater :D) to make it harder for fair players. So i'll continue with this commit and will try to make a more proper morale system.

DoumanAsh commented 9 years ago

A little update for this commit. Feel free take a look

vaendryl commented 9 years ago

looks cool. still think you should make it only have an effect on hard mode or higher

DoumanAsh commented 9 years ago

But it is works only on hard mode :) Look at morale_system_reset() And the morale class itself :)

vaendryl commented 9 years ago

so it does. however, it seems that doesn't work if you lower the difficulty mid-battle. I'd rather see it always active but not do anything when the difficulty is too low. for example, you make a get_evasion method that returns 0 if the difficulty is low, but returns the proper bonus or penalty when the difficulty is hard or higher.

DoumanAsh commented 9 years ago

hmmm... well i thought of that at the beginning... but i think that actually difficulty change should not affect currently ongoing battle... Though as i see currently it has effect so i guess i need to make the same for morale?

Also i think maybe morale should be also mentioned in description of HARD difficulty?

vaendryl commented 9 years ago

if changing the difficulty didn't affect the current battle then being able to do so is meaningless. all other aspects of difficulty already do affect the current battle if you change it.

changing the description would be nice but there are still 2 problems. 1: Sam still needs to give the okay 2: the text is part of the background image instead of part of a screen and cannot easily be changed.

DoumanAsh commented 9 years ago

Ok i will re-write a little bit according to general difficulty way

And yes, i wasn't able to find in code description so i guessed it's just image... :)

DoumanAsh commented 9 years ago

Well, you can take another look :) Also share your thoughts on bonuses/debuffs... Maybe we should make it stronger(except for dmg, too unreal :D)

vaendryl commented 9 years ago

I like your use of the @property decorator :) never messed with stuff like that before. a setter method is implied, right?

it seems to be shaping up well. I think the current values are okay for now. I'll ask sam what he thinks about this and if he doesn't hate it I can merge it.

vaendryl commented 9 years ago

Sam thinks this idea is more fit as a mod than a part of the main game. however, he'd like to make a dedicated mod screen where people can toggle various mods (like this one) on and off and maybe ship the game with mods pre-installed. essentially that would mean we can merge it but with a global on/off switch that defaults to off. on the flipside, that means it doesn't have to be limited to only hard difficulty anymore.

DoumanAsh commented 9 years ago

I see, i'll remove difficulty part. So what to do with this commit of mine in general?

BlueOrange commented 9 years ago

I'd suggest cancelling the pull request, and restructuring what you've done so that it uses the decorator and strategy patterns - so that it works like a mod, using a similar approach to what I did for sidemissions. Swapping out player_ships shouldn't be overly difficult. If functionality from functions.rpy moves into a class, then you could swap out one 'functions class' for another (or overwrite the method pointers), as well.

EnderShadow commented 9 years ago

looks like I need to modify the bonus screen again...

DoumanAsh commented 9 years ago

Well i guess i do need to cancel this pull request. I will leave it for now in my repo only. I don't really see it as mod which is separated from game as it's either should be part of game in some way or part of another mode which makes game a more hardcore. If needed you can find this commit in my repo