Jump to content

[Tutorial] Faction System


Xiphoid

Recommended Posts

Hi Ascension Game Dev !

 

I'm explain my faction system and made a tutorial for forum.

 

Firstly,

Create to Variable for Factions

4fae1f803336c3c6cec21e16cac6b4c8.png5edf4c889f8424cf43d57527b7848c77.png

We need create an Event NPC for Faction Choose (Apply Conditions)

45b7a766c3ae9b832601a2dcd143b14b.png

Create Common Event for Player Labels

f6ea0dcdeadc3f3e5d280d82e6d3539b.png

PUNISHMENT SYSTEM AND KILL REWARDS

Create two Global Variable

ae55cab8a4d141d86e68ee4623cc3fc1.pngfc1905919a99ef74d08ef70f1f91d9c2.png

And Create this Player Variables

796aa94982cdaee52936d663f9cb2d3f.png

And Create this Common Events

7a03e789cd24e9538b7c6c1539c43641.png

19d3cb6bd93fd3c77a1379d5d8732a9f.png

274d7f26e55dc7cd0344a00c4ab9af06.png

69fe608676a7185601d62042c548fdc9.png

Apply this steps for Demon !

My Reward is "Angel Medal" and "Demon Medal" for PvP Shop

 

My Punishment is 1 Day wait in Jail when an Angel kill an Angel or a Demon kill a Demon (so i can't PvP On/Off and i'm thinking this system)

 

(Important) You should add an Event NPC for leave from Jail map.

 

Create Factions in your games !

Link to comment
Share on other sites

Nice! 

 

First thing I noticed is that you can greatly optimise by having a variable Factions and basing the actual faction the player is in, on that variable.

 

So:

 

Player Variable Factions = 0 -> No faction

Player Variable Factions = 1 -> Angel

Player Variable Factions = 2 -> Demon

etc. 

 

That way you can clean up your events, and it's easier to expand.

Link to comment
Share on other sites

From what I can see, the Faction system isn't bad, but it has a couple big flaws.
In your Reward/Punishment section, you can't compare Player Variables of 2 players, therefore the Punishment will never or always happen.

Link to comment
Share on other sites

19 minutes ago, Dashplant said:

Nice! 

 

First thing I noticed is that you can greatly optimise by having a variable Factions and basing the actual faction the player is in, on that variable.

 

So:

 

Player Variable Factions = 0 -> No faction

Player Variable Factions = 1 -> Angel

Player Variable Factions = 2 -> Demon

etc. 

 

That way you can clean up your events, and it's easier to expand.

Thanks for reply ! This is my game's functions we are tested and best way is this way for us.

13 minutes ago, AisenArvalis said:

From what I can see, the Faction system isn't bad, but it has a couple big flaws.
In your Reward/Punishment section, you can't compare Player Variables of 2 players, therefore the Punishment will never or always happen.

Thanks for reply ! Reward/Punishment system is work well is for my game we will tested. We added condition for Arena maps and Special PvP zones.

Link to comment
Share on other sites

10 minutes ago, Xiphoid said:

Thanks for reply ! This is my game's functions we are tested and best way is this way for us.

Thanks for reply ! Reward/Punishment system is work well is for my game we will tested. We added condition for Arena maps and Special PvP zones.

 

You don't seem to understand here. It's flawed on a fundamental level.

 

Page Only exists when you're an Angel, ok.
Conditional Branch checks if YOU'RE an angel, will always be true

Will ALWAYS teleport YOU to jail, even if you kill a demon.

Lemme break it down:

@>Conditional Branch: [Player Variable: Angel is equal to True] - This will ALWAYS come true
      @>Warp Player[Map]
      @>
   : Else
      @>Change Player Items [Give: Item Angel Medal] - Will never happen
      ...
   @>
   : End Branch
@>

Do you understand what I mean here?
You cannot compare 2 players variables no matter what, they're isolated in their own values.

Link to comment
Share on other sites

59 minutes ago, AisenArvalis said:

 

You don't seem to understand here. It's flawed on a fundamental level.

 

Page Only exists when you're an Angel, ok.
Conditional Branch checks if YOU'RE an angel, will always be true

Will ALWAYS teleport YOU to jail, even if you kill a demon.

Lemme break it down:


@>Conditional Branch: [Player Variable: Angel is equal to True] - This will ALWAYS come true
      @>Warp Player[Map]
      @>
   : Else
      @>Change Player Items [Give: Item Angel Medal] - Will never happen
      ...
   @>
   : End Branch
@>

Do you understand what I mean here?
You cannot compare 2 players variables no matter what, they're isolated in their own values.

Okay i'm understand. Solution is coming in 20 Minutes

Link to comment
Share on other sites

I have to commend your effort but as I stated you cannot compare variables to the enemy that you just killed. Using self switches will not work the way you intend for it to work.

Self Switches are in essence Player Variables that are forced to Boolean values. So as I stated before, you cannot and I repeat CANNOT compare Variables OR Switches of 2 players unless you pass them off into a Global Variable first, which is prone to errors for multiple reasons.

Link to comment
Share on other sites

Good job on making it actually work this time.

However, there's still a big flaw in the system that is unfortunately impossible to fix.


What happens if 2 players die at the SAME time. Unlikely to happen with a small player base but if you have a bigger player base it will eventually happen.

Let's call 4 players for this case.
1 Angel and 3 Demons
Demon1 Kills Angel1
&
Demon2 Kills Demon3
At the same time.

Now there's a chance that the Demon killing an Angel could get punished for it and the Demon killing another Demon won't get punished.

 

But overall, good job on getting it to work :)

Link to comment
Share on other sites

When Kill an Angel a Demon getting Angel Medal now

When Kill an Angel an Angel Punished

When Kill a Demon kill an Angel getting Demon Medal now

When Kill a Demon kill an Angel Punished.

 

Next work checking multiple kills and party scenarios

Link to comment
Share on other sites

1 hour ago, AisenArvalis said:

Good job on making it actually work this time.

However, there's still a big flaw in the system that is unfortunately impossible to fix.


What happens if 2 players die at the SAME time. Unlikely to happen with a small player base but if you have a bigger player base it will eventually happen.

Let's call 4 players for this case.
1 Angel and 3 Demons
Demon1 Kills Angel1
&
Demon2 Kills Demon3
At the same time.

Now there's a chance that the Demon killing an Angel could get punished for it and the Demon killing another Demon won't get punished.

 

But overall, good job on getting it to work :)

 

 

We tested this scenarios and fix/solution coming ! :P

Link to comment
Share on other sites

5 minutes ago, Ainz Ooal Gown said:

 

Sorry buddy but I still dont thin that will work, the way you have done rewards, it will either always be true or not...

Do you try ? It will working fine on my game now.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I'm sorry but I can't understand how the rewards and penalties system works.

 

Can you make a more elaborate guide? Put everything as shown in the guide but it doesn't work at all.

 

Anyway, I appreciate the effort.

Link to comment
Share on other sites

30 minutes ago, Jotak1ng said:

Hi, I'm sorry but I can't understand how the rewards and penalties system works.

 

Can you make a more elaborate guide? Put everything as shown in the guide but it doesn't work at all.

 

Anyway, I appreciate the effort.

I want add all steps for new users soon

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...