[MOD 0.12.33] Power armor mk3 0.1.0

Topics and discussion about specific mods
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

rscBogey wrote:It still gave the unexpected name error, i tried unzipping the file too and it gave the same error
Well it's working for everyone else apparently so I have no clue what may be happening when you unzip it try putting it into the data folder but I will do what you did and see if I get the same results and if I do I will try and fix it
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

Okay, what i did was i deleted the dashes and the _0.1.0 in both the file name and the info.json and it worked just fine try that
rscBogey
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun May 29, 2016 2:27 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by rscBogey »

Cobraslaya wrote:Okay, what i did was i deleted the dashes and the _0.1.0 in both the file name and the info.json and it worked just fine try that
New error
Path __Power armor mk3__/graphics/icons/power-armor-mk3.png does not match any mod.
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

Try downloading the new .zip file I put up and see if that works if not I don't know how to help you it works just fine for me
rscBogey
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun May 29, 2016 2:27 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by rscBogey »

Cobraslaya wrote:Try downloading the new .zip file I put up and see if that works if not I don't know how to help you it works just fine for me
The new file worked. Had to keep it zipped, in the mod folder, and added _0.1.0 to the end.
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

Well I'm glad it worked for you do have fun with it :D
Mr.Mech
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu May 19, 2016 11:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Mr.Mech »

Hi, I downloaded the mod but the 0.1.0._0.1.0. error keeps popping up. I know you said to extract and put into the data folder, but can you tell me exactly how you do it? And can you try and fix it? ;)
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

You extract it and put it in the data folder next to core and base that's pretty much it and I can not fix it for you because it works just fine for me so I wouldn't be able to fix it cause I myself have no problems with it sorry mate
Cobraslaya
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue May 17, 2016 9:44 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Cobraslaya »

If you post a picture of what exactly you did I may be able to point out what you did wrong
User avatar
Vigil
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Jun 04, 2016 7:38 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Vigil »

DevilXD wrote:
Cobraslaya wrote:Unfortunate I don't think there is a way to change the look of the character I've spent a good 3+ hours trying to figure it out with no luck I am truly sorry :(
There is a way to change the graphics for a character, you just can't add an animation for armor to the three existing ones :) Take a look at "Factorio/data/base/prototypes/entity/demo-entities.lua", at the top is a "player" entity ;)
Are you suggesting that the dev just add the following code to demo-entities.lua in a new folder within the mod? [modfiles..\prototypes\entities\demo-entities.lua]

Code: Select all

data:extend(
{
  {
    type = "player",
    animations =
    {
      armors = data.is_demo and {} or {"basic-modular-armor", "power-armor", "power-armor-mk2", "power-armor-mk3"},
      idle =
        {
          layers =
          {
            playeranimations.level1.idle,
            playeranimations.level1.idlemask,
            playeranimations.level3addon.idle,
            playeranimations.level3addon.idlemask
          }
        },
        idle_with_gun =
        {
          layers =
          {
            playeranimations.level1.idlewithgun,
            playeranimations.level1.idlewithgunmask,
            playeranimations.level3addon.idlewithgun,
            playeranimations.level3addon.idlewithgunmask,
          }
        },
        mining_with_hands =
        {
          layers =
          {
            playeranimations.level1.miningwithhands,
            playeranimations.level1.miningwithhandsmask,
            playeranimations.level3addon.miningwithhands,
            playeranimations.level3addon.miningwithhandsmask,
          }
        },
        mining_with_tool =
        {
          layers =
          {
            playeranimations.level1.miningwithtool,
            playeranimations.level1.miningwithtoolmask,
            playeranimations.level3addon.miningwithtool,
            playeranimations.level3addon.miningwithtoolmask,
          }
        },
        running_with_gun =
        {
          layers =
          {
            playeranimations.level1.runningwithgun,
            playeranimations.level1.runningwithgunmask,
            playeranimations.level3addon.runningwithgun,
            playeranimations.level3addon.runningwithgunmask,
          }
        },
        running =
        {
          layers =
          {
            playeranimations.level1.running,
            playeranimations.level1.runningmask,
            playeranimations.level3addon.running,
            playeranimations.level3addon.runningmask,
          }
        }
      }
    }
 
It seems like a pretty small fix, but taking the mod apart to try and fix this bug is... noticeably difficult. I've tried this very fix - along with changing the armor priority to group F (the original had group E assigned which seemed to conflict with Power Armor MK2 - I wanted to be sure) and making sure the sprite-sheet is consistent, but it does not seem to work even in spite of these changes.

You said you made a mod like this at one point; how exactly did you get around this problem? What was your mod, too? I can't find it, but I'm certain it'd be interesting to look at...! I've been looking for a mod that expands the power armor grid significantly for a long time; this mod practically made my day, but I would like to help fix the graphical issue that we seem to be experiencing.

[EDIT:] I've been digging through this code for a while now and the only thing I've managed to do is prove how bad I am at coding in Lua, so that's neat. Major thanks to the guy that made the mod in the first place; even getting it to work the way it is now seems pretty good, and I'm grateful to have some OP armor now...!
[ Currently not able to service requests. Apologies for the inconvenience. ]
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by DevilXD »

Vigil wrote:You said you made a mod like this at one point; how exactly did you get around this problem? What was your mod, too? I can't find it, but I'm certain it'd be interesting to look at...! I've been looking for a mod that expands the power armor grid significantly for a long time; this mod practically made my day, but I would like to help fix the graphical issue that we seem to be experiencing.
Well, you can't find it, because I didn't post it anywhere :) It's basically the same mod as this one, but the grid is 14x14, as opposed to 20x20 (which is ridiculously overpowered IMO) and the icon graphic is different...
Vigil wrote:Are you suggesting that the dev just add the following code to demo-entities.lua in a new folder within the mod? [modfiles..\prototypes\entities\demo-entities.lua]
Of course not, you can just modify the data.raw entry for the player entity from the mod environment itself :) I just pointed the mod author in the right direction and hoped that he knows Lua well enough to add this one line of code into his mod, but I think I was asking for too much :P Here's a path to the player entity accessible from the mod environment:

Code: Select all

data.raw.player.player
Then you have to choose the animation you want to modify. The first one is a player without armor, the second one - with basic armor and the third one - with power armor. We want to modify the power armor so:

Code: Select all

data.raw.player.player.animations[3].armors
Then, it's just a matter of modifying this variable to add modded power armor:

Code: Select all

data.raw.player.player.animations[3].armors = data.is_demo and {} or {"basic-modular-armor", "power-armor", "power-armor-mk2", "power-armor-mk3},
IDK if demo can support mods, but we can simplify this to just:

Code: Select all

data.raw.player.player.animations[3].armors = {"basic-modular-armor", "power-armor", "power-armor-mk2", "power-armor-mk3},
The line above should work just fine, but the problem arises if another mod does the same thing (the variable gets overwritten). To prevent that, we have to just use the table.insert method:

Code: Select all

if not data.is_demo then
    table.insert(data.raw.player.player.animations[3].armors, "power-armor-mk3")
end
The code fragment above is copied directly from my mod and it works beautifully :) I hope that I explained this well enough :D
StarFox31
Inserter
Inserter
Posts: 28
Joined: Wed Apr 20, 2016 11:02 am
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by StarFox31 »

nonstickfrypan wrote: How do I get my character to look blue (in some screenshots I see their character looks a bit like energy shield mkii)?
Be Player 2.
Image
User avatar
Vigil
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Jun 04, 2016 7:38 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Vigil »

DevilXD wrote:
Vigil wrote:You said you made a mod like this at one point; how exactly did you get around this problem? What was your mod, too? I can't find it, but I'm certain it'd be interesting to look at...! I've been looking for a mod that expands the power armor grid significantly for a long time; this mod practically made my day, but I would like to help fix the graphical issue that we seem to be experiencing.
Well, you can't find it, because I didn't post it anywhere :) It's basically the same mod as this one, but the grid is 14x14, as opposed to 20x20 (which is ridiculously overpowered IMO) and the icon graphic is different...
Vigil wrote:Are you suggesting that the dev just add the following code to demo-entities.lua in a new folder within the mod? [modfiles..\prototypes\entities\demo-entities.lua]
Of course not, you can just modify the data.raw entry for the player entity from the mod environment itself :) I just pointed the mod author in the right direction and hoped that he knows Lua well enough to add this one line of code into his mod, but I think I was asking for too much :P Here's a path to the player entity accessible from the mod environment:

Code: Select all

data.raw.player.player
Then you have to choose the animation you want to modify. The first one is a player without armor, the second one - with basic armor and the third one - with power armor. We want to modify the power armor so:

Code: Select all

data.raw.player.player.animations[3].armors
Then, it's just a matter of modifying this variable to add modded power armor:

Code: Select all

data.raw.player.player.animations[3].armors = data.is_demo and {} or {"basic-modular-armor", "power-armor", "power-armor-mk2", "power-armor-mk3},
IDK if demo can support mods, but we can simplify this to just:

Code: Select all

data.raw.player.player.animations[3].armors = {"basic-modular-armor", "power-armor", "power-armor-mk2", "power-armor-mk3},
The line above should work just fine, but the problem arises if another mod does the same thing (the variable gets overwritten). To prevent that, we have to just use the table.insert method:

Code: Select all

if not data.is_demo then
    table.insert(data.raw.player.player.animations[3].armors, "power-armor-mk3")
end
The code fragment above is copied directly from my mod and it works beautifully :) I hope that I explained this well enough :D
It's certainly well explained, but I know nothing about code. That said, if I get the chance, I might try to do this myself some time. Who knows, maybe make the equipment grid 36x36. =P

Thank you for your time, though, that's useful reference information for modding.
[ Currently not able to service requests. Apologies for the inconvenience. ]
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by DevilXD »

Vigil wrote:It's certainly well explained, but I know nothing about code. That said, if I get the chance, I might try to do this myself some time. Who knows, maybe make the equipment grid 36x36. =P
I don't know if that big of a grid would even fit on the screen, but... Whatever :P Good luck and have fun modding :D
User avatar
Vigil
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Jun 04, 2016 7:38 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by Vigil »

DevilXD wrote:
Vigil wrote:It's certainly well explained, but I know nothing about code. That said, if I get the chance, I might try to do this myself some time. Who knows, maybe make the equipment grid 36x36. =P
I don't know if that big of a grid would even fit on the screen, but... Whatever :P Good luck and have fun modding :D
It's funny, really - one of the major mods I've been looking for is a sort of "infinite upgrade" thing for the modular power suit; progressive stages that go from 12x12 to 24x24 [if you REALLY sink a lot of resources into the research]. Maybe with this information I can actually try something like that. You seem like you know a lot, but I think everyone could benefit from you setting out your tuition in a more step-by-step form. Browsing around the mod-help forums, I don't see a lot about making things like armor work (there is one that mentions the demo-entities prototype, but it's a very short thread). Like the dev said, this is one of their first mods - and I've never modded. The chance to learn from someone that knows what they're doing could be pretty neat...!
[ Currently not able to service requests. Apologies for the inconvenience. ]
AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by AutoMcD »

I'm curious about this as well, considering trying to make the shoulder mounted gun appear for the advanced personal defense. Have a few other ideas too.. The more info is out there, the more it helps everyone. ;)
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by DevilXD »

Vigil wrote:You seem like you know a lot, but I think everyone could benefit from you setting out your tuition in a more step-by-step form. Browsing around the mod-help forums, I don't see a lot about making things like armor work (there is one that mentions the demo-entities prototype, but it's a very short thread). Like the dev said, this is one of their first mods - and I've never modded. The chance to learn from someone that knows what they're doing could be pretty neat...!
Making armor work is a piece of cake - just copy & paste the item's table from original game files and modify it as you need. Take a look at this:

Code: Select all

{
    type = "armor",
    name = "power-armor-mk3",
    icon = "__Power_Armor_MK3__/graphics/power-armor-mk3-icon.png",
    resistances =
    {
        {
            type = "physical",
            decrease = 15,
            percent = 50,
        },
        {
            type = "acid",
            decrease = 15,
            percent = 50,
        },
        {
            type = "explosion",
            decrease = 20,
            percent = 50,
        }
    },
    durability = 30000,
    order = "e[power-armor-mk3]",
    equipment_grid = { width = 14, height = 14 },
}
Can you distinguish which values are responsible for what ? Yeah, it's that simple :) Modding is simple, as long as your work is supported by the mod API. If you need to do something that isn't supported by API however, that's the trickiest part of the modding right there (at least in Factorio) ;)

As for the knowledge of modding... I made a couple of mods in Lua, the biggest one isn't even for the Factorio game (it was "Equivalent Exchange" type mod for the Don't Starve game). The second one being a mod for Factorio, the Compact Factory mod which lets you compact you're base a lot... I love coding (which is a part of modding of course) and finding solutions to complicated problems. I hope that's what I'll be doing for the rest of my life (school, job, etc.), but anyways...
AutoMcD wrote:I'm curious about this as well, considering trying to make the shoulder mounted gun appear for the advanced personal defense. Have a few other ideas too.. The more info is out there, the more it helps everyone. ;)
I don't know if it's currently possible, it would be if adding animations to the character was possible... In any case, you would need to make/render all 12 animations which is impossible without access to the original player model... Also, modifying animations by hand would be a challenge, because each of the 12 animations consists of 176 individual frames - that's 2112 modifications :!:
AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by AutoMcD »

DevilXD wrote: I don't know if it's currently possible, it would be if adding animations to the character was possible... In any case, you would need to make/render all 12 animations which is impossible without access to the original player model... Also, modifying animations by hand would be a challenge, because each of the 12 animations consists of 176 individual frames - that's 2112 modifications :!:
wow, that sounds like a project. :/
I was thinking more like an overlay where I'd only need one for each direction you could be facing.
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by DevilXD »

AutoMcD wrote:wow, that sounds like a project. :/
I was thinking more like an overlay where I'd only need one for each direction you could be facing.
The thing is, that's the overlay :) There's another 12 animations, 176 frames each, that's just an original player model ;)

Look inside "Factorio/base/graphics/entity/player" for the animations and inside "Factorio/base/prototypes/entities/demo-entities.lua" for what animations are assigned to what armor types.

The graphics are divided into 3 levels - level1 is an original player model, level2 is an overlay of basic armor for that model, and level3 is an overlay of power armor for that model. Inside "demo-entities.lua" you can see that the level1 and level2 are combined when the player is wearing basic armor, and level1 and level3 - when the player is wearing the power armor. I hope that I explained it well enough :)
callum1234
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Jun 08, 2016 1:18 pm
Contact:

Re: [MOD 0.12.33] Power armor mk3 0.1.0

Post by callum1234 »

the mods shows dependencies as being base >=0.12.33. Any ideas what this is?
Post Reply

Return to “Mods”