Classes + Extra bodies

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

Classes 0.16.1:
Converted some values to globals to make remote calls work. example function add_classes() in control.lua
Changed buttons to a standard style.
over-all code cleanups
Fixed builder starting inventory.
Added a technology filter on class definitions as an unlocker. Works like prerequisites on technology (need them all to unlock)
Made all 4 current classes buildable on the "Bodies" research.
Added the whole "Select a Character" menu for the multiple bodies system.
all bodies you build will be associated to you as a player so you can switch between them.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

so, like.... give me feedback on this so far?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
doppelEben
Fast Inserter
Fast Inserter
Posts: 117
Joined: Thu Oct 27, 2016 6:21 am
Contact:

Re: Classes + Extra bodies

Post by doppelEben »

not a feedback but more likely a question: How can I give my char a class in an already existing game?

the discuss-tab in the mod-portal doesnt answer this question.

My game is in progress and I just set up most early-game stuff. just wondering if I should restart or if there is any way to get the chars to a game in progress?

and: Does it have advantage on mid/late game, or just some boost on early game?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

doppelEben wrote:not a feedback but more likely a question: How can I give my char a class in an already existing game?

the discuss-tab in the mod-portal doesnt answer this question.

My game is in progress and I just set up most early-game stuff. just wondering if I should restart or if there is any way to get the chars to a game in progress?

and: Does it have advantage on mid/late game, or just some boost on early game?
when you die, you can choose a class.
and when you get to the mid-late game, you can build additional bodies, and swap between them with the GUI button at the top of the screen.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
credomane
Filter Inserter
Filter Inserter
Posts: 307
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: Classes + Extra bodies

Post by credomane »

Just discovered you released this mod. Give me a few days to play around some. Though after an initial look over the code I do have some knee-jerk opinions that will either be confirmed or debunked with some actual play time. So don't take these opinions very seriously at all for now.

The fighter class looks to be the weakest choice all-round as I can't think of when I would ever chose it intentionally. Unless the first thing you do upon spawning as a fighter is go hunt biters the other classes will have heavy-armor, submachine gun and regular ammo automated by the time expansion is needed. Giving the fighter speed as the main advantage. +50hp and faster healing factor seem lackluster without play testing.

The builder I might take as the starter body on the rare occasion but mostly won't use it until it is researched then take it as "main" body (or I die). The hand crafting speed boost will always come in handy somehow because no matter how much automation I have I still handcraft plenty of stuff. The 10x transport belts are belts that I won't have to craft but they won't go very far at all. Increased reach seems nice but I've gotten so used vanilla reach so baked into me I probably won't notice such a small increase. If it was double or triple vanilla then I would certainly take notice. Bigger inventory is always welcome as I always find myself carrying a lot of left over junk that should have been put in an assembler/smelter a long time ago. This will probably become my go to body once power armor makes an appearance or the miner class wears out the smelting usefulness.

The miner is looking to be the best choice just for the two starter steel axes. Once I get a couple steel axes I'm set for most of the game. Toss in ability to hand smelt ore and an extra burner miner just adds icing to the cake. Though those two will be far less helpful as the first smelting array goes up. Giving the advantage to the builder class.


Once bots and power armor are acquired the differences between the classes become nearly pointless as the they are now. As far as a generic avatar mod goes I think I'm going to love it. The "name-brand" Avatar mod tends to feel way too late game; especially with your mods installed.

My initial guess at how my style will play out is pick miner for the steel axes then later switch to the builder for the larger inventory once I die or power armor neutralizes the benefits of the other classes. Power armor the great class equalizer. :/ Then just keep the others around as fast travel stooges to distant outposts which is what I do with the name-brand Avatar mod.

Isn't is possible to modify a player character's resistances? Giving the fighter some small built-in resistance to everything would go a long way boosting the class as a worthwhile option pre-power armor, imo. I just feel like if you strip out the starter/respawn items the classes don't significantly differ and with the start items included the same goes for past the first research of each automation and military. Well miner still has steel axes as an advantage but that just one more research away. Perhaps that is what you are intending it to be like?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

Let me know how it goes.

one of the things I have been considering, is that along the tech tree you could have additional unlock points to unlock new higher tier, or hybrid classes. so miner MK2 could mine even faster than he does now, or have fewer down sides.
miner/builder hybrid could have all the advantages of both, which is super useful because you have fast hand smelting then.

I can look into seeing what happens if you put resistances on your character.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Asanda_Nima
Inserter
Inserter
Posts: 46
Joined: Thu Aug 17, 2017 8:34 am
Contact:

Re: Classes + Extra bodies

Post by Asanda_Nima »

bobingabout wrote:Let me know how it goes.

one of the things I have been considering, is that along the tech tree you could have additional unlock points to unlock new higher tier, or hybrid classes. so miner MK2 could mine even faster than he does now, or have fewer down sides.
miner/builder hybrid could have all the advantages of both, which is super useful because you have fast hand smelting then.

I can look into seeing what happens if you put resistances on your character.

That sounds interesting,being able to improve via skill tree.

Do you know if it’s possible to disable certain tech, when you pick another?
For example: you have multiple branches for miner. Current productivity, less pollution, less energy consumption.
If you pick productivity you can’t pick the other?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

Asanda_Nima wrote:
bobingabout wrote:Let me know how it goes.

one of the things I have been considering, is that along the tech tree you could have additional unlock points to unlock new higher tier, or hybrid classes. so miner MK2 could mine even faster than he does now, or have fewer down sides.
miner/builder hybrid could have all the advantages of both, which is super useful because you have fast hand smelting then.

I can look into seeing what happens if you put resistances on your character.

That sounds interesting,being able to improve via skill tree.

Do you know if it’s possible to disable certain tech, when you pick another?
For example: you have multiple branches for miner. Current productivity, less pollution, less energy consumption.
If you pick productivity you can’t pick the other?
not easily, but with scripting, it is in theory.
Though, it all resets if you update something, so you need more scripts to sort that out.

an alternative would be that it simply unlocks points, that you then spend in a different menu to choose what happens. you choices can then even be personal for you, not for your whole force like technology would be.

I am trying to keep multiplayer in mind too. Fighter was originally named Scout, which is why they have the run speed.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
credomane
Filter Inserter
Filter Inserter
Posts: 307
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: Classes + Extra bodies

Post by credomane »

When I was looking through the code before I noticed that balanced it misspelled as ballanced. Forgot to mention it until I saw it in-game. Probably too late to correct the lua code but at least the locale value for "bob-class-ballanced" could be fixed.
Also the capitalization of "Bob's multiple characters & classes" in the factorio mod screen doesn't match the case of your other mods where every word is capitalized, except for "mod".

Anyways, on to my actual play testing:
Different map styles put different classes as the class of choice. Used full Angel+Bob mods for my testing and limited myself to the first hour of game play as I wanted to quickly try all four classes in each of the vanilla game modes. Not much time I know but I didn't get much time this weekend to play.

Contrary to my initial thoughts the Fighter is actually my preferred class for most game types. That movement speed is just too good! So much saved time with all the running around at the start of a map.

Marathon games are the only map type that I found myself preferring the Miner over the Fighter. The extra burner miner is a huge jump start while the Fighter starting without one at all is a huge set back. The Miner being a mobile furnace made things that much easier too. Could self mine, crush, smelt for copper/tin/lead without needing to move the burner miners and/or crushers around. Just getting the first burner miner with the Fighter took nearly 15 minutes of hand mining! Too much iron went back into producing iron picks slowing the Fighter down even more. Though I did discover I could cheat the system by placing the burner miner before picking the fighter. I didn't use this for play testing as that would skew everything and ruin the purpose of the testing. Other maps I didn't find myself needing/using the miner's characteristics much.

The Builder's crafting speed was noticeable but I had a hard time judging just how helpful it actually was. Perhaps with more time on a map? Inventory size was very nice because I didn't need to chest dump as much.

On closing if the Fighter was made slower and given baked-in resistances instead then it wouldn't feel like such a stand out class compared to the others, IMO. Assuming the previous sentence becomes reality I could equally choose between Fighter, Builder and Balanced for starting most maps.
Would probably go with the following myself (assuming fighter changes):
Default = Balanced/Builder
Rich Resources = Balanced/Builder
Marathon = Miner
Death world = Fighter
Death World Marathon = Miner
Rail World = Balanced/Builder


[edit]
Miner MK2 could potentially smelt materials that require fluids. Though that would be a lot of recipe scanning to create barrel versions of fluid using smelting recipes.
Builder MK2 could use the same thing on the crafting side.
Not really sure what Fighter MK2 would get. More HP and resistances?

[edit2]
The Miner's mining speed is insanely fast but the slow smelting speed (read crafting speed) severely limited the practical usefulness of the stupid fast mining. Stupid fast mining was really only useful for trees, rocks and coal. Early game coal was so easy to come by because of this. lol
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

credomane wrote:Though I did discover I could cheat the system by placing the burner miner before picking the fighter.
I am aware that this could be an issue. It's the main reason why I implemented things as I did, as follows:
Firstly, the entity is migrated, meaning anything you have in your inventory is copied to the new class.
Then, there's a list of what inventory items you should have as that class, and a list of items to remove.
The array is run through, and as items are removed, others are added. In the case that you've placed the miner already, you get 45 less ammo added.
here's the full list for the fighter.

Code: Select all

      {remove = {name="iron-plate", count=4}, add = {name="iron-axe", count=1}},
      {remove = {name="iron-plate", count=4}, add = {name="heavy-armor", count=1}},
      {remove = {name="pistol", count = 1}, add = {name="submachine-gun", count = 1}},
      {remove = {name="burner-mining-drill", count = 1}, add = {name="firearm-magazine", count=45}},
      {remove = {name="stone-furnace", count = 1}, add = {name="firearm-magazine", count=45}}
Pretty much every class has that first line. The exception is the miner who has steel axe instead.
credomane wrote:The Builder's crafting speed was noticeable but I had a hard time judging just how helpful it actually was.
Previous feedback tells me it should be faster. current bonus is only 20%
credomane wrote:On closing if the Fighter was made slower and given baked-in resistances instead then it wouldn't feel like such a stand out class compared to the others
I think I am going to look into this, however, the question is how it would then be affected by the armor. It's probably something that to know exactly what is going on would need both in game testing, and a browse of the source code.

credomane wrote:Miner MK2 could potentially smelt materials that require fluids. Though that would be a lot of recipe scanning to create barrel versions of fluid using smelting recipes.
Builder MK2 could use the same thing on the crafting side.
Not really sure what Fighter MK2 would get. More HP and resistances?
in my opinion, the recipes thing is something that would have to be done manually, but it is worth looking into.
credomane wrote:The Miner's mining speed is insanely fast but the slow smelting speed (read crafting speed) severely limited the practical usefulness of the stupid fast mining. Stupid fast mining was really only useful for trees, rocks and coal. Early game coal was so easy to come by because of this. lol
It's hard to judge just how much of an effect the mining speed has, because it's just one component in determining how fast something mines, but I have had previous feedback saying I should reduce it.

Code: Select all

(Mining power - Mining hardness) * Mining speed / Mining time = Production rate (in resource/sec)
Mining time / ((Mining power - Mining hardness) * Mining speed) = Seconds for one resource item
(Tool power - Mining hardness) * (1 + Mining Speed Modifier) * .6 / Mining Time = Production rate (in resource/sec)
This uses a player mining speed of .01 per tick or .6 per second, and their bare hands with no axe uses a Tool power of 1
current values for the miner class have a speed of 0.05, which is 5 times the normal mining speed, where machines (like the oil drill) typically have a speed of 1. definitions are very different, it seems that the 0.01 (per tick) in mining speed on the player could be equivalent to a 0.6 on the mining drill (per second), but I'd need to look at code to be sure. If this is true, it means the miner has a mining speed of 3.

Compare for me if you will, the mining speed of a Bob mining drill MK3 (The one made from titanium, just before the best one, not an area miner) to the miner class player using a cobalt mining axe. if I'm right, they should mine at about the same speed.

Remember, ores have different hardness, so mine at different speeds. it might be easier to tell the difference on a harder ore, like Tungsten.


But yeah, 400% bonus to miner's mining speed and 20% bonus to builder's crafting speed. it's not exactly balanced, is it?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

More on player entity resistances. I finally got around to browsing the game code.
it took a bit of figuring out, but this is my interpretation.

From what I can understand... when a player entity is damaged, this is what happens:
1. The armor's resistances are applied to the damage. Decrease is applied before Percent.
2. If the armor has anything that absorbs damage (Such as the shield of a grid item), this is applied next.
3. The player character entities resistances are applied.
4. Any value left by this point is reduced from the player character entities health.

So... Yes, in theory, if you give the player character entity resistances, they'll be applied after the armor has done it's job. the only thing that we didn't know was if #3 was done, but play testing would have proven it to be true anyway.


If I make this change to the fighter class, I will likely give the player entity resistances INSTEAD of speed... which could open up the opportunity for a new class with the speed boost... sugestions?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
ukezi
Filter Inserter
Filter Inserter
Posts: 392
Joined: Sat Jul 02, 2016 11:02 pm
Contact:

Re: Classes + Extra bodies

Post by ukezi »

how about the transporter? +speed +inventory size -mining speed -crafting speed?
arbarbonif
Fast Inserter
Fast Inserter
Posts: 110
Joined: Fri Jul 01, 2016 2:46 am
Contact:

Re: Classes + Extra bodies

Post by arbarbonif »

It would be nice to have a lower level research that let you change your active class. Miner is great to start but I actually want hand smelting to be turned off once I get smelteries set up, otherwise I accidentally hand smelt steel which takes forever and is a waste. I'd like to switch to builder, but I either need to suicide or wait until after high level circuits which is really annoying. If I could just change my class with science pack 2 and maybe advanced circuit equivalents, that would be about perfect. I could see switching to fighter for the first big biter push and then to builder for the foreseeable future.

As is, I'm try to decide if I just want to run myself over with my first real train to force the switch.
Aelrath
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri May 11, 2018 7:10 am
Contact:

Re: Classes + Extra bodies

Post by Aelrath »

I am really enjoying the classes. I'm just having some issues getting the Body Switch GUI to work. I've built two of the body classes (the fighter and builder) but the GUI stays empty making it impossible to switch (except when dying which I have been doing). Am I missing something?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

Aelrath wrote:I am really enjoying the classes. I'm just having some issues getting the Body Switch GUI to work. I've built two of the body classes (the fighter and builder) but the GUI stays empty making it impossible to switch (except when dying which I have been doing). Am I missing something?
The class selector pops up on spawn or when you die to give you a new free body.

When you build one and place it manually, it should automatically be added to your body's list.
It SHOULD update automatically, even when open, but closing it and reopening might help.

The list isn't maintained independently, it simply reads the associated characters table from the player definitions.
Last time I played the game, it worked fine, though it is possible something has changed to break it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Aelrath
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri May 11, 2018 7:10 am
Contact:

Re: Classes + Extra bodies

Post by Aelrath »

Thanks for the quick reply bobingabout. I completely missed that you placed the new built body in the world. I thought it was just an inventory item that depending on which classes you had with you, you can switch to that class.

This mechanic of switching between actual built players bodies placed in the world opens up interesting opportunities, Specialized fighting armor and weapons on fighter body or armor with many bot ports etc for building in base.

I love your mods and I hope you will continue adding more of this amazing new flavour to this great game (and community).
Thanks for the assistance and all the hard work on the mods.

PS. My friend would love a Scout Class - Faster moving (compared to fighter), very low inventory, larger sight radius, extremely low mining speed (and possibly lower threat radius to biters? sneaky ninja-like :) )
MageKing17
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Thu Jun 01, 2017 6:52 pm
Contact:

Re: Classes + Extra bodies

Post by MageKing17 »

Trying to switch bodies on different surfaces causes a crash.
Attachments
body_change_factorissimo.png
body_change_factorissimo.png (105.39 KiB) Viewed 6838 times
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

there's nothing in my code that limits it to a specific surface... it sounds like I need to do something special to check surface before I swap...


in theory, it's not going to be too difficult.
instead of simply doing this:

Code: Select all

  local old_character = game.players[player_index].character
  game.players[player_index].character = new_character
I will need to check to see if new_character ~= old_character, and if true (they don't match) first set it to nil, then teleport the player (while disconnected) to new_character.position, new_character.surface... then then set the player character to new_character.

Code: Select all

function switch_character(player_index, new_character)
  local old_character = game.players[player_index].character
  if new_character.surface ~= game.players[player_index].surface then --are we looking at the same surface as the new character?
    game.players[player_index].character = nil --we're not, disconnect the player
    game.players[player_index].teleport(new_character.position, new_character.surface) --look at the new surface
  end
  game.players[player_index].character = new_character
  if old_character then
    game.players[player_index].associate_character(old_character)
  end
  refresh_avatar_gui(player_index)
end
untested, but that should do it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Classes + Extra bodies

Post by bobingabout »

And it works, I'll release the fix shortly.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Bob's mods”