[MOD 0.13] AutoPvP - automated PvP map and forces

Topics and discussion about specific mods
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

[MOD 0.13] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Infos
  • Type: Mod
  • Name: AutoPvP
  • Description: Automatic PvP mod to help you setting up PvP maps and fights, with automatic force creation and settings, random player placement and resources allocation.
  • Tested-With-Factorio-Version: 0.13.0
  • Multiplayer compatible: tested on a headless server...
  • Locale: english, french
  • Tags: PvP, map generation, forces.
  • License: You are free to use and distribute this mod and also to modify it for personal use, but not to release a modified version without permission (unless visibly not maintained anymore).
  • Portal download : https://mods.factorio.com/mods/binbinhfr/AutoPvP
logo.jpg
logo.jpg (25.2 KiB) Viewed 17375 times
Here is AutoPvP, an automatic PvP mod to help you setting up PvP maps and fights.

The way it works :
- each player joining the game is asking if he wants to use AutoPvP mod, and what mode he wants : "single death mode" or "rebirth mode".
screen1.jpg
screen1.jpg (11.86 KiB) Viewed 17375 times
- if he enables AutoPvp, he is assigned a new force, that will be enemy with every other forces.
- he is teleported on a free region the map, where the map is generated by factorio.
screen2.jpg
screen2.jpg (6.11 KiB) Viewed 17375 times
- after a possible little delay (factorio map generation can be slow), some resources are spawned (like in a starting area), and the zone is cleared of trees in a medium radius. Then the player is asked if he wants to start on this region, or if he wants to choose another region. He can also regenerate the resources (ores, oil) that have been spawned on the zone.
screen3.jpg
screen3.jpg (10.11 KiB) Viewed 17375 times
- until he accepts a starting region, the player is invincible, so that he can visit the map around and make his decision without being killed by biters or players.
- when he accepts a starting region :
- he becomes mortal again, and enemy to any other team and also biters.
- the chosen region is cleared of biters in a confortable radius.
- some water pounds are spawned on this region to help building a first base.
- every player connecting to the server will be proposed a region following this process.
screen4.jpg
screen4.jpg (159.33 KiB) Viewed 17375 times
Then the game can start and the goal is always to kill other players. A player who is killed is eliminated : he respawns but becomes neutral (in case he wants to continue to grow his base or wants to watch the rest of the game).

The last player who was never killed is the winner.

In "single death mode", the player is eliminated the first time he is killed.
In "Rebirth mode", it's different. You have access to a Rebirth technology, with Rebirth Centers (buildings) and Souls (items).

The principle is simple : if you construct one Rebirth Center, everytime you die, you can respawn automatically close to this nice building, if it contains enough Souls to enable your reincarnation.

Souls are the basic ingredient of this new-age holistic technology : they are also used to construct these Rebirth Centers, and to slowly "autorepair" them.

Therefore, from now on, if your oponent wants to kill you definitely, he will have to destroy your Rebirth Center before. Or cut into your Souls production.
You are not so weak as before... You can now take a little more risks, knowing that you have several lifes, as my cat pretends to. So go on, organize deadly incursion into your enemy factory, and who cares if you die...

These Rebirth Centers are a bit organic, connected to a parallel spiritual plane (or something like that, it's not very clear in the user's manual). Thus they cannot be repaired by robots, because it would be too easy :-). However, they have the capability to slowly auto-heal themselves, consuming the Souls they contain (1 Soul heals 1% health).

There are 4 levels of Rebirth Centers, with associated Souls : light, medium, advanced and ultimate. A Rebirth Center can only consume the Souls of the same level. Higher level Centers have more health and are more difficult to destroy. They are also more expensive.

These centers do not need energy, but they need to be fed by Souls. So place them accordingly, and protect them from your opponents. They behave like logistic requester chests, in case you want to feed them automatically with souls.

Constructing a Rebirth Center of higher level requires one Rebirth Center of the previous level. You can use the existing one or build a new one if you are afraid of the transition.

But remember that you can only have one Rebirth Center at a time on the map. When your Rebirth Center is destroyed (you will receive a warning), you'd better run and place quickly another Center back on the map, with corresponding souls in it !...

Note : If you have a map using a previous version of AutoPvP, by default, you will be switched to the new Rebirth mode.
Later on, you can switch between modes using /c interface.call("autopvp","rebirth") or /c interface.call("autopvp","single")
(for "upgraders", I made some testings in MP, but you should make a backup of your map before trying the new mode, just in case... :-D )

Have fun !
And tell me if you like it.

For those who want some more complex team management, you can use my SpaceBook mod.
Last edited by binbinhfr on Tue Sep 06, 2016 5:23 pm, edited 9 times in total.
My mods on the Factorio Mod Portal :geek:

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by kyranzor »

Great work dude, this is exactly what people have been wanting. Spacebook is just too cumbersome for what most people need so this is a perfect twist, thanks for doing it. It will enable people to use my mod in PvP which is handy for both of us ;)

Grimshad
Inserter
Inserter
Posts: 42
Joined: Thu Dec 11, 2014 12:37 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Grimshad »

ive been waiting for this. thanks.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Don't hesitate to tell if it works correctly because I did not make intensive testings for the moment.

I intend to integrate some kind of a Pvp flag :
it would be another goal : instead of killing your opponents, you will have to destroy its flag (that will have a lot of HP), so it will be more a factory-vs-factory game, because you won't be able to destory the flag with your simple gun, you'll have to approach it with lasers or turrets, which could be fun, no ?
My mods on the Factorio Mod Portal :geek:

zvighostixz
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jul 11, 2016 8:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by zvighostixz »

Whenever I try to generate a new map, it gives me the error:

"Error while running event handler: __AutoPvP__/control.lua:129: Unknown item name: free-electric-pole"

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

waooo, sorry, the red wine was quite good at noon ;-) I published the mod with debug/testing mode on. Please load last version.
My mods on the Factorio Mod Portal :geek:

Fisch
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jul 06, 2016 11:58 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Fisch »

Great mod!
Is it possible to increase distance of points of respawn from the center of the map?
I tried to increase the number of chunks from 6 to 24 in the configuration, but the generation of the starting point hangs.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Hi Fisch,

It is not possible with the actual version. A 24x24 chunks zone is too large to be revealed, so the program waits forever...

So I introduced a distinction between zone distance and zone width
zone distance = distance between zones (large) default 24 chunks = 768 tiles which gives you room for your factory.
zone width = area of the zone to be revealed (small) default 6 is good.

please update to 1.0.6 and tell me if it's good for you.

factorio could be slow in the beginning, because it seems taht he continues generating hidden map in the background.
My mods on the Factorio Mod Portal :geek:

Fisch
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jul 06, 2016 11:58 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Fisch »

Yes, distance of respawn is ok by now. But the aliens have become more aggressive.
Whether it is possible to clear a large area from the aliens?

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Fisch wrote:Yes, distance of respawn is ok by now. But the aliens have become more aggressive.
Whether it is possible to clear a large area from the aliens?
The problem is that I cannot clean a zone that is not discovered yet. So I can just clean the zone discovered around your character when it is positionned in his spawning zone.
As soon as you reveal a new part of the map around, factorio generates it, with ores, trees, aliens, etc... And as you ask for a further spawning point, factorio generates more aliens (usually teh more distance from the center of the map, the more resources and the more aliens...)

And map generation is quite slow and works in background. Modder has no control on it.

So I cannot clean from the beginning of the game. As a turnaround : I ask factori ofor background map generation around the player and for 10 minutes, regularly, I clean the aliens in the zone which is progressively revealed. It will do the trick.

please update.

1.0.7 = increase alien-free zone width and tree-free zone width (customisable in config.lua)
clean aliens regularly during 10 mins during map generation in background.
My mods on the Factorio Mod Portal :geek:

Fisch
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jul 06, 2016 11:58 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Fisch »

After updating the size of the world began to grow rapidly: file size exceeds 12 megabytes in 30 minutes.
Multiplayer has become very slow...

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

I cannot help you a lot with that...
I did what you want, and I explained the counterparts.
To kill aliens around further, you need to discover the world.
I forced the world discovery and kill aliens, but then the map size grows, because it has to store all this discovered world...
That's logical. And it's the way Factorio works...

Try to edit the config.lua file to reduce numbers. (I will publish a new version with these "reasonable" numbers, so you can update from portal).

Anyway, if you want to PvP, you should not be so far from each other : you must be close enough so that the fight is inevitable.
And try to reduce aliens at generation in the factorio menu.

Try :

Code: Select all

-- map is divided in zones where only one player can start.

zone_distance_in_chunks = 12-- distance between zones in chunks (chunk is 32x32), use a multiple of 2
zone_distance = zone_distance_in_chunks * 32 -- distance between zones in real distance

zone_width_in_chunks = 6 -- revealed starting zone width in chunks (chunk is 32x32), use a multiple of 2
zone_nb_chunks = zone_width_in_chunks*zone_width_in_chunks -- nb of chunks per zone
zone_width = zone_width_in_chunks * 32 -- zone width in real distance

resources_radius = 75 -- radius of the staring zone where to spawn resources
ore_radius_min = 10 -- average radius of an ore zone
ore_radius_max = 15 
ore_amount_min = 750 -- average amount of an ore field
ore_amount_max = 1250
fluid_yield_min = 150 -- average yield in %
fluid_yield_max = 300

alien_free_radius = 300-- radius of the alien cleaning zone around the spawning point
tree_free_radius = 75 -- radius of the tree cleaning zone around the spawning point

flag_health_easy = 500
flag_health_normal = 5000
flag_health_hard = 50000
My mods on the Factorio Mod Portal :geek:

JohnnyBandit
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri May 29, 2015 7:35 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by JohnnyBandit »

I think you might have broken something, because when the biters attack, they can attack me, but my turrets and i cannot attack them, unless i force the attack with "c" instead of "space" but even then my turrets wont attack

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

You're right ! Something seems to have changed in factorio.
I published a new version. please upgrade.
it should automatically correct existing map at next map load.

tell me if it works.
My mods on the Factorio Mod Portal :geek:

Fisch
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jul 06, 2016 11:58 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Fisch »

Good day.
Multiplayer is now running smoothly.
Biters appear quite far away and they do not disturb.
There are a few problems at the start:
1) player appears frequently in water
2) resources often appear in water
3) large deposits of core resources appear at the starting point
4) players start close to each other(for example, one player gets the starting point in the north, the other in the northeast)
5) map of the area, which the player has discovered at the start is not removed(the player can see the pollution of the enemy base)

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Hi Fisch,

answering your remarks by number :
1) I have no control on map generation. It's the result of factorio random design. Since 0.13, it seems that there is a lot of water. You can reduce this in the generation menu when creating the map. I do not change any map generation setting. You are still the decider.
2) You must understand how my mod works : it divides the map into 9 big square regions around the center of the map. Then it proposes these regions randomly to connected players, each time generating a slightly random position in the big square region, with some random ores. If the player does not accept, ores are erased and another of the 9 square regiosn are proposed. As players can make this choice process in parallel, that was the only safe and easy solution I found to avoid 2 users too close. Some times a square zone is very full of water, and it's not easy to find a spawning point or to place ores : then refuse and try another region. I have no way to quantify these poor regions. Note : if there are more than 7 players, it proposes the 16 other further big square regions around the initial 3x3 area.
3) for the deposit of ores in the center, that's also factorio generation, not me.
4) as players accept and refuses in parralel, I cannot garanty that they won't finally accept 2 contiguous zones...
5) again, it's the way factorio works. Factorio is not really fully designed for PvP for the moment. The only solution is to desactivate polution on map, to avoid cheating.

So in resume, my mod cannot do everything. And it does not control map generation (it just adds ores, chops trees and kills aliens around the chosen spawning points). When you looking for a good map, you still have to make several tries with the other players, until everyone seems happy with his own zone...
My mods on the Factorio Mod Portal :geek:

Fisch
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jul 06, 2016 11:58 am
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by Fisch »

3) >for the deposit of ores in the center, that's also factorio generation, not me.
I mean here that: is it possible to erase all ores in the every new spawning point before adding starting ore deposits?
5) Modification SpaceBook allows player to change the faction as a result of which he will obtain clean map. Is it possible to change the player's faction after confirming the spawning point position?

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Fisch wrote:3) >for the deposit of ores in the center, that's also factorio generation, not me.
I mean here that: is it possible to erase all ores in the every new spawning point before adding starting ore deposits?

I thought about that before, but as a player can refuse a zone, I have to recover erased ore if the player refuses that zone. That's lots of data to store.
The ores you see in the zones are those generated by factorio. I just add a few ores by myself, just to help the player starting his factory.

5) Modification SpaceBook allows player to change the faction as a result of which he will obtain clean map. Is it possible to change the player's faction after confirming the spawning point position?
I wrote SpaceBook, but I did not notice that the fog of war changes when you change force. Interesting. I will check what I can do. Maybe put players neutral when deciding, and then change their force. Because when visiting, you should not be attacked by aliens.

I come back to you in the day.
My mods on the Factorio Mod Portal :geek:

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by binbinhfr »

Well, Fisch , after some heavy work, it seems that we have now something more fair and less visible !
And for the map, I added a lot of new features, trying to deal with factorio map generation.

Please tell me if it works for you.

Here is the details :
1.0.10
- to hide map from each other player when visiting, player forces are always mutual enemy.
only aliens change from friends (during the visit) to enemy when a zone is accepted.
- during visit, player is assigned a temporary visiting force, so that when entering fight,
he changes force to the fighting force, and loses the map view on all the zones he visited before.
- result : when entering fight, the player only sees his own little starting zone and nothing else !
- when visiting zones, adds a button to regenerate a different resources mapping on the same zone.
- wipe trees when proposing a zone, restore them if declined.
- wipe original ores when proposing a zone, restore them if declined.
- so when visiting a zone, the player has a consistent view on what he will accept or not.
(only the little water pond is not generated because it's hard to revert).
- try to find a better spawning point, waiting fo full map generation to reposition the player a second time.
-> avoid water in many cases, unless the zone is really a sea...
- at the first turn, try to propose zones that have never been visited. Then repropose previous zones
with different configs.
My mods on the Factorio Mod Portal :geek:

TheWorld
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Jul 27, 2016 6:30 pm
Contact:

Re: [MOD 0.13.X] AutoPvP - automated PvP map and forces

Post by TheWorld »

It's rare to see such a responsive modmaker, i'm really impressed.
Thank you on what you are doing, me and i think, lots of people, appreciate it a lot!

Post Reply

Return to “Mods”