-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic factions #609
base: master
Are you sure you want to change the base?
Dynamic factions #609
Conversation
individual, and squad relation dynamics
build failed ;) |
damn case sensitive unix
now it doesn't |
It certainly goes into the right direction and gives the game a dynamic touch, but without looking at the code I can't really tell whether its flexible enough ;) In case you haven't noticed, I put this on the meeting agenda, I think its worth to be discussed in person |
Build fails, since we don't have an implementation for std::hash<Handle<...>> yet. Can simply be forwarded to a std::hash of the pointer, if we ignore that a free'd pointer might be allocated by the next new again, leaving us with undefined behaviour. |
@mrzzzrm I added the hashes, please try again, when ok I will merge the master back into it |
… dynamic_factions Conflicts: src/ai/squad.cpp
added a delay before friendliness is slowly resettet to default
fixed bug that came with a previous merge, also added a delay before friendliness is reset to faction default. |
|
||
|
||
Character::Character(Ship& ship, Faction& faction): | ||
m_ship(ship), | ||
m_faction(&faction), | ||
m_task(nullptr) | ||
m_task(nullptr), | ||
m_world(World::instance()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we have the Singleton, we should use it. Not some obscure pointer that was once retrieved from this singleton
The dynamic function stuff REALLY bloats up the character code and is pretty obscure at times. Things like the dynamic_factions need to be carefully balanceable, and long methods doing tons of stuff under one name don't really help here. |
Attacking, ramming other ships has diplomatic consequences.
generally neutral npc react stronger than good friends or fierce enemies.
Every change in relations has sideeffects on all other relations to the other factions. The more the like or dislike the attacked faction, the stronger the side effect (killing police will make the pirates like you)
Lastly I introduced personal (character-based) friendliness to other worldobject. Shooting at a lonely police ship might not make the entire police force hate you, but the ship's pilot will, and he will attack back. This personal friendliness declines over time back to the faction relation.