Aller au contenu

Photo

[Question] Adding a global morality meter to the game


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
I want to add something like a moratlity meter to the game similar to the ones used in KotOR or Mass Effect.
With every bad or evil decision the value drops and by doing good it increases again.

How would I do that?
Is there a system for global variables that I can hijack?
How would I display the value so that the player is informed about the consequences of his/her decisions?

#2
Mengtzu

Mengtzu
  • Members
  • 258 messages
A quick and dirty work-around is to use plot items as tokens - I did this for a reputation system in Broken City. In place of storing a variable you can just count the items in the inventory, and while the UI is far from ideal, it's free.

#3
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
Nice idea actually.
I could use the black and white runestones from Alistairs gifts.
A black runestone for morally wrong decisions and a white one for good ones.

Counting them is easy and I can also use a similar approach for my different factions.

Now I would need a way to prevent the player from throwing them away.

Modifié par Apolyon6k, 03 avril 2011 - 02:19 .


#4
sea-

sea-
  • Members
  • 264 messages
Set them as plot items?

Alternately, is it possible to use the companion approval system to have a "hidden" companion labeled Morality or some such?

#5
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
I don't know how to set a "hidden" companion, although getting his approval would be easy by GetFollowerApproval. The problem is that the player would not see the current value.
I could check if the cat gets approval after being fired from the party and killed but I doubt it.

As for the plot items, it was too long ago that I actually played DAO to remember that plot items are indestructible per definition. Plot items also don't count against the inventory limit so carrying masses of different tokens is no problem (but would hinder the player from distinguishing between them).

Edit: Or I could just enable the approval system for the player character and adjust it there.
It works, tested it a minute ago. looks funny but combining it with tokens might be even better to signal the player that there are concequences for different courses of action because I'm not sure how the approval system handles its different states and how I can add to them. I haven't even gotten the warm, in love and the other states to work yet.

Modifié par Apolyon6k, 03 avril 2011 - 10:25 .


#6
sea-

sea-
  • Members
  • 264 messages
By hidden companion, I meant a party member who isn't actually in the party. Pretty sure it's possible to set approval even without them being present (at least based on some stuff BioWare did in Awakening). They might show up in the party picker if you plan to use it, though.

#7
Proleric

Proleric
  • Members
  • 2 346 messages
You can make additional global variables in the var_module 2DA.

I've found that this only works for my standalone module if I make a custom version of the official 2DA which includes both the official fields and the new ones (i.e. not an M2DA extension). I specific my 2DA in module properties and put it in core override (module override doesn't seem to work in this case).

You could use plot flags to increase or decrease the "meter".

There are various ways to give the player feedback on their score, such as DisplayStatusMessage or using SetName on an item.

#8
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
The more I work with 2DAs the more I dislike them, there are too many occasion where the toolset or the game ignore my 2DAs so every situation without using them is welcome. The worst one is rewards.gda. it is ignored every second start of the toolset and therefore inside the game as well. Because of that I'm changing all the XP and item rewards to scripts.

With a codex entry telling the player about the approval bar on the player character and some few plot items it is more reliable and easier to control.

As to the hidden companion, that could be possible because I don't use the party picker gui, have only three companions total. But it wouldn't change the fact that the active value would be hidden as well.

Writing a "tutorial" for the player and informing him/her about a new feature or a different way of using the gui is better imo.

Modifié par Apolyon6k, 05 avril 2011 - 03:15 .


#9
sea-

sea-
  • Members
  • 264 messages
If you want to go with a hidden companion, can you use a custom item to display the player's morality as floaty text?  It's a bit cumbersome, but I think every option is going to be... as far as I know you can't easily mod the GUI to include such a feature and have to rely on hacks.

There's also plot flags.  You wouldn't be able to store an exact value using them, but you could have, say, angelic/very good/good/nice/neutral/bad/evil/very evil/Satanic, and change them to true/false based on the status of other flags.  Though now that I think about it, that sounds like way more work...

Modifié par sea-, 05 avril 2011 - 05:14 .


#10
Proleric

Proleric
  • Members
  • 2 346 messages
Regarding 2DA tables, it would be a pity to dispense with them, as they are so useful, and drive so much tried-and-tested code.

There is a known issue, which affects the rewards 2DA amongst others.

I've found that the solution is always to reopen the toolset before assigning values from a custom 2DA drop-down. Once the assignment is made, the toolset always remembers it (even if it displays incorrectly at times), and it always works in game.

That's because the bug happens somewhere in the save/export functions of the toolset. It's as though the toolset "forgets" all custom tables. If you don't save anything until all the assignments are made, it works perfectly.

Much the same bug occurs with a custom var_module. Occasionally, compilations and exports may start to fail (with an error message) because the toolset can't find that 2DA any more.

I find that 2DA tables always work in module override, and that moving them to some higher priority folder doesn't reduce the bugginess (as has sometimes been reported). Exception : var_module only works in core override.

#11
Apolyon6k

Apolyon6k
  • Members
  • 175 messages
When I have a better understanding of the approval system I could use that system to check for different approval values on the player character. The system that is used for the companions can easily be used for other purposes like my "morality meter" but first I have to understand how it works.

Floaty text messages are not a good idea because they surely kill immersion. The codex and quest log is a better way and with the approval bar working there is a simple way to keep the active value visible.

Edit:
The 2DA system is too buggy at the moment and without a toolset update it is not reliable enough for my taste. There are parts where I have to use it (Background & classes) and there I hope that changes are recognized properly but if I can avoid it the better.

Modifié par Apolyon6k, 05 avril 2011 - 06:06 .


#12
Proleric

Proleric
  • Members
  • 2 346 messages
For some reason, the official approval system has a lot of follower-specific code. Adding a follower by analogy is straightforward, but tedious. I found it easier to rewrite it as parameter-driven common code for my standalone module.