[WIP 0.2.10] The power of Atom

Topics and discussion about specific mods
Post Reply
Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

[WIP 0.2.10] The power of Atom

Post by Amanite »

Hello there!
I am currently working on a mod to add Uranium deposits, uranium processing technologies, civil and military application etc!
ImageThe power of AtomImage

Basically; the mod adds uranium ore deposits Image, allowing you to smelt uranium bars Image and to set up a big nuclear processing facility with different applications Image.
Don't worry, the balance will be kept, the nuke will be something really hard to get, so it will be devastating and must be used VERY carefuly.

Features :
New ores (Uraninite and Fluorite)
New items : Uranium ore, Uranium bar, Empty canister, Hexafluoride canister, Enriched uranium, Depleted uranium, Radioactive waste
New machines : Uranium processing unit, Tesla coil
New recipe category
New technologies : Radioactivity, Civil nuclear exploitation, Atomic weaponry, Advanced ballistics
Uranium isotopes
Nuclear powerplant
ICBM v1, Upgraded missile launcher, ICBM v2

A playable version should be released soon (maybe tomorrow) with placeholders in lieu of the actual 2D art.

If you wish to help, feel free to send a PM, I REALLY need someone to make the 2D art, to help with the sound effects.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by 15Cyndaquil »

Looks cool can't wait to try it out.
The more complicated the game the better

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by ficolas »

allowing you to smelt uranium bars
D:! dont do that! better a enrichmeint (or w/e it is said) process but LOL smelting uranium...
Also the most used radioactive sustance for nuclear reactors isnt uranium, since uranium is x2 rarer than gold, it is plutonium, and also, if you want to do it more realistic, uranium is not green, it is silverly, but DONT search uranium in google images, I did that some time ago, and it is not cool :(

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

I know uranium is not green. It's just a visual cue, since a lot of ore in the game already has a greyish tint. It will be scarce ingame and you'll need A LOT of raw uranium ore to get only a few 235 isotopes.
Smelting uranium ore into uranium bars is barely the beginning of the whole uranium processing which is a very long process and consumes a lot of energy and ore.

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by 15Cyndaquil »

When is your new estimate for a playable version to come out
The more complicated the game the better

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

I've actually encountered a problem with the nuke. I can't find a way to make it work with the missile launcher. The whole uranium processing thing is working but if I released it right now, it would be pointless since the enriched uranium would have literaly no use.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by ficolas »

is the nuke an item that clears all entities in a terrain with lua code, or how does it work?

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

No, it's actually a different type of missile, very costly and hard to create which triggers a huge explosion and has a massive AoE.
I have no idea about how to simulate radiations though.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by FreeER »

Amanite wrote:I have no idea about how to simulate radiations though.
damage all entities with health for 300-6000 ticks?
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

I guess damaging living things in a radius would be okayish.
Anyone has an idea about how to make the nuke fireable by the missile launcher? I'd make a copy of the rocket class and adjust values but I can't find it.
I'll get back to work ASAP.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by FreeER »

well the rocket is under entity\projectiles.json and item\ammo.json...

The main issue is the game does not support AOE (yet) so you'd have to track the rocket with lua (Hopefully onentitydied tells you what killed the entity so you could just do onentitydied by nuke otherwise you'd have to track from when the player fired/acquired the nuke) and when the nuke no longer exists, aka impacts, you'd take the last known coords and do findentities with a large (say 100,100) and then something like sethealth(entity.health-50) (--decrease health by 50) on all of those (though you'd have to check each first to see if they have health or you might get errors). Then every 20 ticks or so for the next 300-6000 ticks (depending on how long you want radiation to last) you'd repeat the procedure and then do something like sethealth(health-[0.05*entity.health]) (--decrease health by five percent). If you didn't repeat the findentities any new entities would not be affected by the radiation. If you wanted a more circular radius you'd have to do several findentities the center of the circle would be long and thin, and then you'd do several on each side that get shorter and shorter until you'd reached the radius you wanted.

Honestly, I'm not sure how'd you would know when to start tracking the nuke (assuming that onentitydied does not tell you weapon that killed them), because I do not believe there is an onplayerfired event...actually not sure if there is an easy way to track projectiles...I'm not certain if find entities would pick up on them so if onentitydied doesn't give you what killed them and findentities does not find projectiles half of what i've said is worthless :lol:

BTW: I think I'd honestly suggest not making the Nuke into a a normal rocket type ammo simply because you would not want rocket turrets to fire them (a bit close to your base lol)...Not sure if that was your intention or not so I said it just in case :)

P.S. Alot of this speculation and I haven't tested it :) I'd be willing to do so if you wanted though.
Last edited by FreeER on Mon Mar 18, 2013 8:08 pm, edited 1 time in total.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by ficolas »

Are you making the mod just with json or with lua too?

If it is with lua, it is possible, just with json, I dont think so.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by FreeER »

No definitely not possible with just json files right now.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

I think you're right, .json properties are too restrictive. I'll definitely need Lua for this. I know firing it from a rocket launcher is a bit wonky, I'd love to add a missile silo but how'd you target? Maybe a laser targetting device then a remote to shoot at said location ...
Anyway, this will be my first time using Lua, I'll try my best.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by FreeER »

Amanite wrote: I'd love to add a missile silo
It will be awesome when we can :)
though it might be possible to use lua using createentity with an animation that makes it look like it is coming towards the planet, then after a timer, have it explode. With the current options you'd probably have to use a 'silo' entity that can store the nukes, then build a second 'radiotower' or something which would check for silos decrement it's stock by one and fire, um without having to build the 'radiotower' actually at the location you want to nuke, I'd have to think about a way for the player to give coords to it though.
Amanite wrote:Anyway, this will be my first time using Lua, I'll try my best.
First, that's all we ask. Second, feel free to ask for any help you might need :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

Oh well, feel free to post an example of Lua code so I can understand the basic syntax and some functions?
I'm a complete newbie so I'm kind of lost. Maybe due to the fact it's 4AM.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by FreeER »

I did a quick basic tutorial on lua in factorio: https://forums.factorio.com/forum/vie ... f=14&t=585
Parts may have errors lol (it is now 1:18 AM for me and I started after I read your post)

If you would like something a bit more specific to your mod:
A quick version is:

Code: Select all

if event.name=="onbuiltentity" and event.createdentity.name=="launcher" then
entities = game.findentities{ topleft = {x = createdentity.position.x - 100, y = createdentity.position.y - 100}, bottomright = {x = createdentity.position.x + 100, y = createdentity.position.y + 100} }
for i,entity in ipairs(entities) do
      game.getplayer().print("checking for Nukes")
         if (entity.name=="Silo") then
            if getitemcount(name="nuke") then entity.insert{name="nuke",count=-1} --might need to clear all nukes and then place the itemcount-1 back in
            break
         end
      end
game.createentity{name="nuke-entity", position={x = createdentity.position.x, y = createdentity.position.y}}
timetilnuke=300
end
if event.name=="ontick" then
if timetilnuke~=nil then
if timetilnuke~=0 then
timetilnuke=timetilnuke-1
elseif timetilnuke=0 then nuke.destroy()
--findentities at nuke coords and do initial damage and set radiation=6000
end
end
if radiation~=nil then --still within ontick
--entity.sethealth(entity.health*0.05)
if radiation~=0 then radiation=radiation-1
elseif radiation=0 then radiation=nil
end
end
 
Something along those lines
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Amanite
Inserter
Inserter
Posts: 20
Joined: Mon Feb 25, 2013 9:15 pm
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Amanite »

Thank you, I'll get back to work tomorrow!

Shalashalska
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sun Feb 24, 2013 5:33 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by Shalashalska »

ficolas wrote:
allowing you to smelt uranium bars
D:! dont do that! better a enrichmeint (or w/e it is said) process but LOL smelting uranium...
Also the most used radioactive sustance for nuclear reactors isnt uranium, since uranium is x2 rarer than gold, it is plutonium, and also, if you want to do it more realistic, uranium is not green, it is silverly, but DONT search uranium in google images, I did that some time ago, and it is not cool :(
And natural plutonium is far rarer than uranium. However, plutonium is a result of quite a few nuclear processes.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [WIP 0.2.10] The power of Atom

Post by ficolas »

Shalashalska wrote:And natural plutonium is far rarer than uranium. However, plutonium is a result of quite a few nuclear processes.
Didnt know that, I thought that plutonium was more common than uranium, since it is used more in nuclear plants.

Post Reply

Return to “Mods”