[Mod] Factions (sapier's) [0.1.5] [factions]

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

[Mod] Factions (sapier's) [0.1.5] [factions]

by sapier » Thu May 09, 2013 19:10

Description:
This mod provides a api to handle factions as well as reputation of players in different factions.
It supports temporary faction members to allow mobs joining a faction.
This mod is inspired by old faction mod sadly providing a chat interface only. If you currently used old faction mod you can use this one with very few changes.

Notes:
-Factions are world specific.
-data storage is not compatible with old faction mod (sorry)
-formspec gui is missing

License: WTFPL
Dependencies: -

Download:
Version 0.1.5

API Documentation:
[url=animalsmod.comuf.com/factions_mod]Doxygen Doc[/url]

Chatcommand Documentation:
User commands:
/factions -> info on your current factions
/factions info <factionname> -> show description of faction
/factions list -> show list of factions
/factions leave <factionname> -> leave specified faction
/factions join <factionname> -> join specified faction

Admin commands:
/factions create <factionname> -> create a new faction
/factions delete <factionname> -> delete a faction
/factions leave <factionname> <playername> -> remove player from faction
/factions invite <factionname> <playername> -> invite player to faction
/factions set_free <factionname> <true/false> -> set faction free to join
/factions admin <factionname> <playername> <true/false> -> make player admin of faction
/factions description <factionname> <text> -> set description for faction

Changelog:

0.1.5
-add default group players

0.1.4
-fix various issues becoming obvious on integration to mobf

0.1.3
-fix crash on adding first member

0.1.2
-fix crash on specifying invalid faction to chathandler

0.1.1
-fixed bug in chathandlers
-fixed invalid help text

0.1.0
-Initial version
Last edited by sapier on Sun Sep 01, 2013 12:15, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
kaeza
Moderator
 
Posts: 2158
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Thu May 09, 2013 21:57

Cool!
Can you add a command to set a per-faction spawn point (like for example, a base)?

EDIT:
Tried to execute:
Code: Select all
/factions create

(note: no faction name given, this was intentional)
This came up:
Code: Select all
03:01:32: ERROR[main]: ServerError: LuaError: error: .../bin/../games/testing/mods/factions/chatcommands.lua:385: attempt to call global 'get_player_by_name' (a nil value)
Last edited by kaeza on Fri May 10, 2013 06:04, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri May 10, 2013 08:05

are you sure you didn't do a /f actions create? this bug is in "/f" command handler ...
does minetest subsequently call all matching chat handlers?

e.g. if following ones are registred

/1234
/123
/12
/1
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
kaeza
Moderator
 
Posts: 2158
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Fri May 10, 2013 08:07

sapier wrote:are you sure you didn't do a /f actions create? this bug is in "/f" command handler ...
does minetest subsequently call all matching chat handlers?

e.g. if following ones are registred

/1234
/123
/12
/1

Scratch that... it seems to work now O.o
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri May 10, 2013 08:15

You most likely downloaded fixed version just this moment, there was a bug in those handlers. Still if minetest calles all handlers I need to recheck some error cases.
Last edited by sapier on Fri May 10, 2013 08:16, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri May 10, 2013 08:20

spawnpoint is a little bit difficult to add as you can be member in multiple factions. Which spawnpoint should be the one taking effect?
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
kaeza
Moderator
 
Posts: 2158
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Fri May 10, 2013 08:45

sapier wrote:spawnpoint is a little bit difficult to add as you can be member in multiple factions. Which spawnpoint should be the one taking effect?

hmm... good point...
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Jordach
Member
 
Posts: 4518
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Fri May 10, 2013 15:43

The first spawnpoint registered. Or give the user a choice for default.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri May 10, 2013 23:54

if someone provides claiming/selling I gladly merge it but for the moment I don't plan to add new features on my own.

EDIT1:
this mod is just bywork for mobf ... and I haven't even done the mobf part by now ;-)
Last edited by sapier on Fri May 10, 2013 23:54, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Mon May 13, 2013 23:08

What do you add for the <value> part of the command?
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Mon May 13, 2013 23:30

value is true or false I updated main post
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Tue May 14, 2013 03:07

I am debating whether to add this to MiniTest since it is a single mod unlike the other one. Would this be a good one guys? I haven't played any on multiplayer so I couldn't test it.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Tue May 14, 2013 05:33

I had one more issue, it kept crashing meh server and I could not figure out what was causing it. It just said nil value.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Tue May 14, 2013 11:10

Post the error here
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

keyxmakerx
Member
 
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Wed May 15, 2013 22:55

jojoa1997 wrote:Post the error here

17:51:31: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...t/games/minetest_game/mods/factions/chatcommands.lua:417: attempt to concatenate global 'faction' (a nil value)
17:51:31: ERROR[main]: stack traceback:

In thread 7f81b43ac740:
/build/buildd/minetestc55-201305101947/src/main.cpp:2088: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7f81b43ac740:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void ServerMap::saveBlock(MapBlock*))

This was a test to see it /factions sethome worked... it did not to say the least.

This is one. The other problem i think is when someone without faction privs tries to use the mod. I am not sure how to give everyone factions priv to start with.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Thu May 16, 2013 17:45

@keyxmakerx thanks for your bugreport plz test 0.1.2 containing fix for your problem

Edit1:
initial privs have to be given by server admin, there are 2 privs for factions:

factions_admin:
Can do everything with any faction including creating a faction.

factions_user:
players allowed to use factions in general.


Further there can be faction admins, those can invite/remove any player having factions_user right to the faction they are admin for, as well as give other users admin right for their faction too.
Last edited by sapier on Thu May 16, 2013 17:51, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Sep 01, 2013 12:16

Updated factions mod for usage with mobf
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
BrunoMine
Member
 
Posts: 1022
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Mon Sep 02, 2013 01:26

is possible to place a limit of members in each faction?
If the leader of the faction does not want a player between he can banish?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Nov 09, 2013 23:01

there's no limit but as you have to invite ppl to a faction you're free to stop inviting others ;-)

and yes a admin can "leave" any player ;-)
DON'T mention coding style!
(c) sapier all rights reserved
 

twoelk
Member
 
Posts: 1258
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

by twoelk » Sun Nov 10, 2013 12:37

sapier said:
this mod is just bywork for mobf ... and I haven't even done the mobf part by now ;-)


does this mean you want to add some sort of group behavior to mobf? Like herds fleeing if one is attacked or packs attacking if one member is hurt?
- or does mobf allready have something like that?
 

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Wed Jan 01, 2014 02:17

A little suggestion:
Hud please? or even better when your in a guild,your guild name will be above your name.
Believe you can and you’re halfway there.
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Fri Jan 17, 2014 02:43

/r/ing faction-private chat, best would be 2 commands, one to send one message to the faction, one to change chatmode to faction-private
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 3 guests