[Mod] PvP Areas [pvp_areas]

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] PvP Areas [pvp_areas]

by everamzah » Wed Sep 07, 2016 18:56

Description: Mark areas for PvP, but disallow elsewhere by default. The inversion of this can be achieved by setting Settings -> Mods -> pvp_areas -> PvP by Default.
Usage: /pvp_areas pos1 and /pvp_areas pos2, following by /pvp_areas set. /pvp_areas without argument lists areas. /pvp_areas remove n removes that entry.
Bugs: https://github.com/everamzah/pvp_areas/issues
Requires: 403dada (Sep. 9 2016) or later.

Areas are stored in the world path as "pvp_areas_store.dat".

This mod is a reply to viewtopic.php?f=10&t=15479

Download
Git repository: https://github.com/everamzah/pvp_areas
License: LGPL v2.1+
Last edited by everamzah on Fri Sep 09, 2016 15:52, edited 4 times in total.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] PvP Areas [pvp_areas]

by taikedz » Thu Sep 08, 2016 10:25

I added some things and sent a PR

When testing I found that I could not inflict damage either inside or outside the area... though looking at protector mod's code, it should indeed work.... will look further into that later....
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] PvP Areas [pvp_areas]

by taikedz » Thu Sep 08, 2016 12:06

Some additional changes have been made and my dev branch seems funcitonal..... beta tests to now be done ;-)
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] PvP Areas [pvp_areas]

by everamzah » Thu Sep 08, 2016 12:16

taikedz dev branch is here: https://github.com/taikedz/pvp_areas/tree/dev

I haven't made any changes to my version yet, still waiting to see if I can get the total number of entries in an AreaStore without tracking it separately. get_area(n), where n does not exist, crashes Minetest without error: https://github.com/minetest/minetest/issues/4507
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] PvP Areas [pvp_areas]

by everamzah » Fri Sep 09, 2016 13:17

Some preliminary management of the areas has been implemented. You may now /pvp_area remove n, where n is some AreaStore id number. For now, you'll have to count from 0 using the output of /pvp_areas with no arguments (sent to console). /pvp_areas now lists areas to chat, when issued without argument.

This update requires a change to the engine, for which there is a PR: https://github.com/minetest/minetest/pull/4508
Update: This change was merged. 403dada or later is required.

Also, PvP is now on off by default, and disallowed in set areas only. This can be toggled by going to Settings -> Mods -> pvp_areas and setting `PvP by Default' to false true, or by setting pvp_areas_enable_pvp = false true in minetest.conf.

Edit: I should probably invert that default so the name of the mod makes sense.
Edit: Done.
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [Mod] PvP Areas [pvp_areas]

by Fixerol » Wed Nov 09, 2016 16:24

 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 6 guests

cron