[MOD WIP 0.6.x] Cobra Commander mod

Topics and discussion about specific mods
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by rk84 »

Update:
-Container system for boxcars. There is item called handbrake. It locks all boxcars in place and makes inserters able to insert/extract stuff in/from boxcars. Boxcars are released when you mine the handbrake. Container size is 56. Only inserters can access it.

-Fast loader for loading boxcars. It is heavy like the smart loader, but it does not swing stuff over itself like normal inserters. It pushes stuff farther in front of it.

-CCmod-testarea -scenario. Always day map. No creeper waves, but you can use setattack(count) if you want creepers to attack. Commands like give() and creative() are moved in this scenario . Map editor does not overwrite control.lua so feel free to edit or replace the test map.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by rk84 »

Bugs fixed:
-Error on mined guardhouse
-Auto follow removed too much banners from inventory.

Added stuff:
-Troopers textures. You will love the fighting/death animation. :lol:
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by rk84 »

~20 downloads :lol:
Feedback is welcome. Should I continue making this mod after 0.3.0 update? or mayby there would be some part(s) that would do better as separated "utility" mod?

Post count in modding section was 666 and I just ruined it :)
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by ficolas »

REBMUN S'LIVED EHT DENIUR UOY
xxdolcexx
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Mar 29, 2013 9:27 pm
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by xxdolcexx »

like your mod its so funny what you dit hope there wil be a 0.3 update soon :) keep up the good work
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by rk84 »

xxdolcexx wrote:like your mod its so funny what you dit hope there wil be a 0.3 update soon :) keep up the good work
Thanks :)
current version under construction is more or less launchable. Control.lua needs some work. I also need to decide what to do with sounds and textures in core folder. Before those where just overwriten, now i try to avoid that.

I`m also planning to do other mods that will be supported by this mod. I will move boxcar to other mod that will have, hopefully, freigh station to move items in and out.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
xxdolcexx
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Mar 29, 2013 9:27 pm
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by xxdolcexx »

nice cant wait :) to pay it :) hope you wil find a way to inplent the sound cobra atack lol hahahah :D
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by drs9999 »

rk84 wrote:I also need to decide what to do with sounds and textures in core folder. Before those where just overwriten, now i try to avoid that.
Just a guess, but maybe you can use the data.raw table to "overwrite" the specific textures.
On the wiki is a example how to change the magazine size of the exiting magazines, so I think change the texture path should work the same.
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by slpwnd »

drs9999 wrote:rk84 wrote:
I also need to decide what to do with sounds and textures in core folder. Before those where just overwriten, now i try to avoid that.


Just a guess, but maybe you can use the data.raw table to "overwrite" the specific textures.
On the wiki is a example how to change the magazine size of the exiting magazines, so I think change the texture path should work the same.
The stuff in the core folder cannot be changed at the moment because it is directly wired in the game code. However there is very little of content over there (for instance some gui graphics, arrows, mining sounds, ambient music, walking sounds, etc.). Some of this that is game dependent (walking sounds, mining sounds) will be eventually moved to base. Anything that is in base can be changed via the mechanism shown on the wiki with the magazines.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.2.10] Cobra Commander mod

Post by rk84 »

slpwnd wrote:The stuff in the core folder cannot be changed at the moment because it is directly wired in the game code. However there is very little of content over there (for instance some gui graphics, arrows, mining sounds, ambient music, walking sounds, etc.). Some of this that is game dependent (walking sounds, mining sounds) will be eventually moved to base. Anything that is in base can be changed via the mechanism shown on the wiki with the magazines.
I was guessing that. Thanks for saving my time.
Yea ambient musics, light-cone and alert icons (I like them yellow). Mayby I will make optional download for those.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

Released 0.3.2 version. I should have released it long time ago, but I have been on sidetracks :D

-New version is missing all core textures and sound, if you want those you can seek them from old download.
-Boxcar was removed to Freight station mod. (WIP)
-no custom inserters currently.
-New tech nanobots (Its for repairtool mod). I will probably add support for blueprints mod also.
-Mod interface for testing stuff.
remote.call("ccmod","giveset")
remote.call("ccmod","printglob")

-Installation: extract mod in mods folder, run game, move ccmod below base mod in mod list and restart the game. (also move ccmod below repairtool mod and any future addon)
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by drs9999 »

Haha the fighting animations are cool :D

But sadly the game crashes when I try to place the cluster-mines. Sometimes I am able to place 2-3 of them but then the game crashes - I do not receive an error-msg that explains what went wrong.
rk84 wrote:-New tech nanobots (Its for repairtool mod). I will probably add support for blueprints mod also.
Any Idea how to deal with that?
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

drs9999 wrote:Haha the fighting animations are cool :D

But sadly the game crashes when I try to place the cluster-mines. Sometimes I am able to place 2-3 of them but then the game crashes - I do not receive an error-msg that explains what went wrong.
Yea I think it happen to me too. I made some changes and dunno what caused it, but I just placed 1 stack cluster mines with no problems. The pattern is bit too random so I might change it again :)
Was there a way of telling if something is placeable in some position? hmm
Also for some reason I can't get it to work with mod's interface call.
drs9999 wrote:
rk84 wrote:-New tech nanobots (Its for repairtool mod). I will probably add support for blueprints mod also.
Any Idea how to deal with that?
I'm hoping this will do. :)

Code: Select all

--blueprinttech.lua required with pcall
data.raw.recipe["ccmarker"].enabled = false
data.raw.recipe["pmarker"].enabled = false
data.raw.recipe["nanobots"].enabled = false
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "ccmarker"})
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "pmarker"})
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "nanobots"})
Oh I forgot say ccmod/data.lua will generate modlogs.txt in same folder as factorio.exe
Loading is succefull if there is no lines between timestamp and ended -line.

Example output: (below errors are from mods missing or loaded in wrong order)

Code: Select all

Factorio_0.3.2.3972\mods\ccmod\data.lua 23.04.2013 18:00
...Factorio_0.3.2.3972\mods\ccmod\prototypes\repairtech.lua:1: attempt to index field 'wrench' (a nil value)
Factorio_0.3.2.3972\mods\ccmod\data.lua ended.
Factorio_0.3.2.3972\mods\ccmod\data.lua 23.04.2013 19:36
...Factorio_0.3.2.3972\mods\ccmod\prototypes\repairtech.lua:1: attempt to index field 'wrench' (a nil value)
...torio_0.3.2.3972\mods\ccmod\prototypes\blueprinttech.lua:1: attempt to index field 'ccmarker' (a nil value)
Factorio_0.3.2.3972\mods\ccmod\data.lua ended.
Factorio_0.3.2.3972\mods\ccmod\data.lua 23.04.2013 19:37
...Factorio_0.3.2.3972\mods\ccmod\prototypes\repairtech.lua:1: attempt to index field 'wrench' (a nil value)
Factorio_0.3.2.3972\mods\ccmod\data.lua ended.
Factorio_0.3.2.3972\mods\ccmod\data.lua 23.04.2013 19:38
Factorio_0.3.2.3972\mods\ccmod\data.lua ended.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by drs9999 »

rk84 wrote:Was there a way of telling if something is placeable in some position? hmm
I dont think so, but anyway game.createentity doesnt care about collosion-boxes if you thought that caused the problem.
I guess there is/ was some weird calculation-error in the position-calculation, but I didnt found it, yet :D
rk84 wrote:Also for some reason I can't get it to work with mod's interface call.
What do you mean, or what are you trying?
rk84 wrote:I'm hoping this will do. :)

Code: Select all
--blueprinttech.lua required with pcall
data.raw.recipe["ccmarker"].enabled = false
data.raw.recipe["pmarker"].enabled = false
data.raw.recipe["nanobots"].enabled = false
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "ccmarker"})
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "pmarker"})
table.insert(data.raw.technology["nanobots"].effects, {type = "unlock-recipe", recipe = "nanobots"})
Lol, good that you said that, I totally forgot to add a research for that stuff :D
I think that should work,too. And for the future we can both add a block to our script that checks if the nanobots research was loaded/exists, dependent on the result the script will add the whole research or just add some effects to it. So it should not care which mod was loaded first.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

drs9999 wrote:
rk84 wrote:Was there a way of telling if something is placeable in some position? hmm
I dont think so, but anyway game.createentity doesnt care about collosion-boxes if you thought that caused the problem.
I guess there is/ was some weird calculation-error in the position-calculation, but I didnt found it, yet :D
I now use "findentities" to prevent mines stacking over themselfs and buildings. I have add limit how many times loop tries to place mine (my game freezed because it run out of room :lol: ). Also spread with circle equation was not even so I will use random values as polar coords now.
drs9999 wrote:
rk84 wrote:Also for some reason I can't get it to work with mod's interface call.
What do you mean, or what are you trying?
I got function named spawnmines in mod´s interface just for testing it like 'remote.call("ccmod","spawnmines", game.player.character.position, 16)'. For somereason it gave me error message "blabla Error: 16". Value was always last parameter. Anyways it works now.

drs9999 wrote:Lol, good that you said that, I totally forgot to add a research for that stuff :D
I think that should work,too. And for the future we can both add a block to our script that checks if the nanobots research was loaded/exists, dependent on the result the script will add the whole research or just add some effects to it. So it should not care which mod was loaded first.
heh I though it was left out on purpose and recipes on. So it would be like extension for any mod, but playable without them. If you wanna make it like extension for base mod, I will add check for nanobots.

Also download is updated.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by drs9999 »

rk84 wrote:I now use "findentities" to prevent mines stacking over themselfs and buildings. I have add limit how many times loop tries to place mine (my game freezed because it run out of room :lol: ). Also spread with circle equation was not even so I will use random values as polar coords now.
What is about not placing them randomly? So the normal mines are created in a cicle with an i.e. radius of 4 landmines around the cluster mine.
If a position is already occupied by another entity the script wont place a mine there and goes to the next position. This will prevent an endless-loop.
And maybe the player can receive the "script-was-not-able-to-place"-mines after that.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

drs9999 wrote:
rk84 wrote:I now use "findentities" to prevent mines stacking over themselfs and buildings. I have add limit how many times loop tries to place mine (my game freezed because it run out of room :lol: ). Also spread with circle equation was not even so I will use random values as polar coords now.
What is about not placing them randomly? So the normal mines are created in a cicle with an i.e. radius of 4 landmines around the cluster mine.
If a position is already occupied by another entity the script wont place a mine there and goes to the next position. This will prevent an endless-loop.
And maybe the player can receive the "script-was-not-able-to-place"-mines after that.
Yea I have been thinking static patterns with max radius depending on mine count. It could go around like spiral and skips occupied areas (I wish I could check maptiles).

Now I got another idea... if it can't place mine mayby it could take note of angle. And next time its close to that angle (depenting on radius) it will skip that sector. So entities blocking cluster mine could cast "shadows" and so creating "a blast area".

In short. Image of Nox came into my head :lol:
Image
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by drs9999 »

rk84 wrote:Yea I have been thinking static patterns with max radius depending on mine count. It could go around like spiral and skips occupied areas
Yep that is what I meant.
rk84 wrote:Now I got another idea... if it can't place mine mayby it could take note of angle. And next time its close to that angle (depenting on radius) it will skip that sector. So entities blocking cluster mine could cast "shadows" and so creating "a blast area".
Theoretically an awesome idea, but imo it wont fit to the current behaviour. Atm the cluster-mine do not work like "normal" cluster-mine that will spread more mines around if it is triggered by an enemy ( if I remember it correctly the mines wont raise an onentitydied event, thats why you did it that way). As for now I see the cluster-mine more than a tool to create larger minefields in an faster way than the vanilla-game does.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

Yea. Best I could make is decoy that spread mines on dead.

But creating minefields. Yes. I think it could be usefull for bordering minefield. Mines wouldn't get wrong side of walls and could fill narrow pathways.

Edit: I made static pattern and it works good. function works ok with on mine build, but if I call same function in mod's interface I get this "Cannot execute command. Error: x" (x presents value of last parameter.)

I guess it does not really matter as it is not really needed in interface. just for testing.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [MOD WIP 0.3.2] Cobra Commander mod

Post by rk84 »

Mine update. :)
Image
Works pretty good. It will leak past entities sometimes. Gab between mines ~2tiles in image.

I doubled land mine and cluster mine stack sizes to 32. Cluster mine will spread 32 mines now. Gab between mines is 2.5. I think I will keep it small untill splash damage is implemented. You can spread quite even minefield with these.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Post Reply

Return to “Mods”