[MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Re: [MOD 0.14.13+] Creative Mode 0.2.8 - Instant Blueprint Fix
Ok I found the cause of the bug.
Same steps from above but with CM's event-logging (on_robot_built) checked (with default settings)
Same steps from above but with CM's event-logging (on_robot_built) checked (with default settings)
Re: [MOD 0.14.13+] Creative Mode 0.2.8 - Instant Blueprint Fix
Fair enough.Nexela wrote:That is not something that can not be done currently. What you can do as a work around is in on entity died, check for existing enemies in the area and if none are present destroy() the power source.Taurondir wrote:I don't know if what I am about to ask is easy or hard to do, but I'm pretty sure you would know instantly, based on the amount of work in the Mod and the Magic Wand tools.
I'm adding custom "enemy bases" to a map so players that expand that far have to fight and kill all the defenses to use the area. Dropping an "Active Energy Source" next to a bunch of turrets and an indestructible "Super Energy Pole" or a "Duplicating Chest" full of ammo and then turrets, gives me the instant ability to put down a base full of guns to shoot players.
Now, when accessed by a player (on a force set as enemy), the Duplicating Chest will return "Can't Open Enemy Structures", meaning that a player that takes over the base does not have access to Infinite ammo or other infinite resources, but they CAN drop a power pole next to an Active Energy Source and have infinite electricity.
Can a flag be set or a condition be set so that when an "enemy" connects to a power source no connection is made or no energy is transmitted to stop them doing this?
I'm currently looking through the code of your Creative mod - because it already creates totally unbalanced units for testing anyway - to see if I can make a separate mini-Mod just for my game where I can just place "Super Structures" in the form of turrets that don't need either ammo or Energy, and things that can repair themselves over time without a need for setting up Roboports and feeding them with bots from a Creative Chest like I was trying to do before.
Re: [MOD 0.14.13+] Creative Mode 0.2.8 - Instant Blueprint Fix
Found the issue. Should have checked entity.valid before printing its position. The bug is caused when I'm getting the position of my invalid robot from instant blueprint.Nexela wrote:Ok I found the cause of the bug.
Same steps from above but with CM's event-logging (on_robot_built) checked (with default settings)
But I have some works to do. Will release the fix within these 2 days.
Because the "robot" parameter of on_robot_built_entity is not optional, people may not expect it to be nil. Even though it will still cause error if they try accessing the other entity properties, at least I can say "please check valid before accessing the properties!"Nexela wrote:Also in your on_robot event the valid=false is not needed. for the same reason as above. the lack of valid is false
The option is in config.luaNexela wrote:Just need creative mode to add (or point me to if they exsist) a way to bypass the popup and enable all cheats.
Re: [MOD 0.14.13+] Creative Mode 0.2.8 - Instant Blueprint Fix
I was hoping for a remote interface for it *wink*Mooncat wrote: The option is in config.lua
It doesn't hurt to have it but it is not needed.Mooncat wrote:Because the "robot" parameter of on_robot_built_entity is not optional, people may not expect it to be nil. Even though it will still cause error if they try accessing the other entity properties, at least I can say "please check valid before accessing the properties!"
local valid
if valid then
if valid == true then
Would both return false (not valid)
checking if valid==false is just bad practice IMO since nil and false are false
Re: [MOD 0.14.13+] Creative Mode 0.2.8 - Instant Blueprint Fix
oh, you are talking the valid=false inside {}. I thought you are talking about the whole {valid=false}
I would keep it. Shouldn't expect everyone has the same standard.
And technically nil and false are not the same. valid == nil will return true only if it is nil but not false. Even tho it doesn't matter here due to the limited possible values and consequences of valid, it is a good practice to keep things that are supposed to be "not nil" not nil.
I would keep it. Shouldn't expect everyone has the same standard.
And technically nil and false are not the same. valid == nil will return true only if it is nil but not false. Even tho it doesn't matter here due to the limited possible values and consequences of valid, it is a good practice to keep things that are supposed to be "not nil" not nil.
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
v0.2.9 has been released:
But a much more powerful remote interface will come in the future.
If nothing goes wrong, this will be last version for 0.14 Factorio. Looking forward to 0.15 on next Tuesday.
For Creative Mode, here is the plan:
v0.3.0 = a quick ugly port for 0.15. Also change the on_player_mined_tile event caused by instant deconstruction to on_robot_mined_tile.
Maybe on_entity_died should be changed to on_robot_pre_mined? Let me know what do you think about this.
v0.3.1 = graphics update, base on the new 0.15 icons. Also use the new mod GUI API if possible. But no big change on the layout. (May need a few weeks)
v0.4.0 = Huge overhaul. Use a proper IDE for scripting. Better layout (e.g. group the cheats into foldouts). More powerful remote interface. I'm planning an interface to let other mods to set the states of cheats, or even add more cheats. (2-3 months)
@Nexela: I have tried implementing a remote API for setting the default action on the initial popup. But the existing scripts were not designed for that. It requires too much work. So I cancelled it.- New:- Fixes:
- New option on the modifier popup: backer name.
- Improvements:
- Fixed error when instant blueprint is performed while logging is enabled for the on_robot_built_entity event.
- Ghost tile revival caused by Healer magic wand now invokes on_robot_built_tile instead of on_player_built_tile, for being consistent as instant blueprint.
- the "robot" parameter will be a small table: {valid = false, type = "player", name = "player"}
- the index of player who triggered the revival will still be stored in the "player_index" parameter
- additional parameter "revived" whose value is true
- For the alternate mode of Modifier magic wand, the default values of "Don't select healthless entities" and "Don't select indestructible entities" are changed from true to false, making them different from the standard mode.
- Event logging now checks the "valid" property of parameters of following types before showing some advanced properties like position, train backer name. "valid = false" will be shown if valid is false.
- LuaEntity
- LuaEquipment
- LuaEquipmentGrid
- LuaForce
- LuaGuiElement
- LuaSurface
- LuaTechnology
- LuaTrain
- The on_robot_built_entity and on_robot_built_tile events invoked by this mod due to instant blueprint now have an additional parameter: "instant_blueprint". Its value is always true.
- Similar to above, the on_entity_died and on_player_mined_tile events invoked by this mod due to instant deconstruction now have an additional parameter: "instant_deconstruction". Its value is always true.
But a much more powerful remote interface will come in the future.
If nothing goes wrong, this will be last version for 0.14 Factorio. Looking forward to 0.15 on next Tuesday.
For Creative Mode, here is the plan:
v0.3.0 = a quick ugly port for 0.15. Also change the on_player_mined_tile event caused by instant deconstruction to on_robot_mined_tile.
Maybe on_entity_died should be changed to on_robot_pre_mined? Let me know what do you think about this.
v0.3.1 = graphics update, base on the new 0.15 icons. Also use the new mod GUI API if possible. But no big change on the layout. (May need a few weeks)
v0.4.0 = Huge overhaul. Use a proper IDE for scripting. Better layout (e.g. group the cheats into foldouts). More powerful remote interface. I'm planning an interface to let other mods to set the states of cheats, or even add more cheats. (2-3 months)
Last edited by Mooncat on Sat Apr 22, 2017 9:27 am, edited 1 time in total.
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
nil? or empty tablethe "robot" parameter will be nil
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
Ohhhh the modifier changes are in!!! And they don't do what I thought they did. I wasn't aware it was a history thing
I will wait patiently for the better remote api
Alternatively .15 config settings will work too, I just hate having to remember to update config.lua when you release new goodies
I will wait patiently for the better remote api
Alternatively .15 config settings will work too, I just hate having to remember to update config.lua when you release new goodies
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
oh shit. Typo. It should be the fake robot table: {valid = false, type = "player", name = "player"}Nexela wrote:nil? or empty tablethe "robot" parameter will be nil
Fixed.
What did you think they do?Nexela wrote:Ohhhh the modifier changes are in!!! And they don't do what I thought they did.
I will see if that is easy to implement. If not, it will be in 0.3.1.Nexela wrote:Alternatively .15 config settings will work too, I just hate having to remember to update config.lua when you release new goodies
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
Just updated the wiki page about remote interface:
http://factorio-creative-mode.wikia.com ... _Interface
http://factorio-creative-mode.wikia.com ... _Interface
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
Mooncat, don't know where you are with 0.15 compatibility.... but i ran 0.15.0 and trying to install your mod i get
"Selected mod has no release version."
cheers
"Selected mod has no release version."
cheers
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
It was mid night here when 0.15 was released, and it is 10am now.... please wait until I get home. ^^"impetus maximus wrote:Mooncat, don't know where you are with 0.15 compatibility.... but i ran 0.15.0 and trying to install your mod i get
"Selected mod has no release version."
cheers
- ZombieMooose
- Filter Inserter
- Posts: 289
- Joined: Mon Feb 09, 2015 7:23 am
- Contact:
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
Cheers. I'm waiting patiently =)Mooncat wrote:It was mid night here when 0.15 was released, and it is 10am now.... please wait until I get home. ^^"
"men will literally learn everything about ancient Rome instead of going to therapy"
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
not rushing you friend.
Re: [MOD 0.14.13+] Creative Mode 0.2.9 - Event log error fix
There's a fair bit to adjust to.Mooncat wrote:It was mid night here when 0.15 was released, and it is 10am now.... please wait until I get home. ^^"impetus maximus wrote:Mooncat, don't know where you are with 0.15 compatibility.... but i ran 0.15.0 and trying to install your mod i get
"Selected mod has no release version."
cheers
Energy is the first one.
Unfortunately stripping out all energy features doesn't do it.
Re: [MOD 0.15.1+] Creative Mode 0.3.0 - Update for 0.15!
Released v0.3.0 for Factorio 0.15!
Don't print log for the on_train_created event or error will be thrown due to this bug: viewtopic.php?f=7&t=44883
Changelog
It is just a quick, ugly update, to let people use the mod in 0.15 ASAP. Please expect bug, and report if you encounter one. Don't print log for the on_train_created event or error will be thrown due to this bug: viewtopic.php?f=7&t=44883
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.1+] Creative Mode 0.3.0 - Update for 0.15!
you rock! thank you
Re: [MOD 0.15.1+] Creative Mode 0.3.0 - Update for 0.15!
Error while running event creative-mode::on_tick (ID 0)
__creative-mode__/scripts/util.lua:177: attempt to index local 'item' (a number value)
When enabling instant construction/blueprint laying and applying a blueprint
__creative-mode__/scripts/util.lua:177: attempt to index local 'item' (a number value)
When enabling instant construction/blueprint laying and applying a blueprint
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.1+] Creative Mode 0.3.0 - Update for 0.15!
0.15.2?mavzor wrote:Error while running event creative-mode::on_tick (ID 0)
__creative-mode__/scripts/util.lua:177: attempt to index local 'item' (a number value)
When enabling instant construction/blueprint laying and applying a blueprint
-
- Inserter
- Posts: 48
- Joined: Thu Sep 24, 2015 1:37 pm
Re: [MOD 0.15.1+] Creative Mode 0.3.0 - Update for 0.15!
I have the same error when I load my design/cheat save started in 0.14.impetus maximus wrote:0.15.2?mavzor wrote:Error while running event creative-mode::on_tick (ID 0)
__creative-mode__/scripts/util.lua:177: attempt to index local 'item' (a number value)
When enabling instant construction/blueprint laying and applying a blueprint
In a quick test, enabling cheat mode on a new save and copy-pasting fresh blueprints around does not result in the crash.