Cursed Exp - Main

Topics and discussion about specific mods
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.11

Post by L0771 »

Dodging_Rain wrote:My apologies ahead of time but I need to make some more bug reports. Current version .11
Attempting to use the arrows in the build > mine/turret interface will cause this error.

Image
Another error of compatibility, but you can repair it from Options > Debug GUI, but now if you change version, allways reload GUI.
This is done in version 0.0.12 and a minor problem with MP.
Dodging_Rain wrote:Finally, this one is relatively minor. When using the Foreman's Blueprint Manager mod] and the Time speed button mod. The Time speed button is gone. I am not sure if it is due to UI issues or limits.
I'm not sure, now i'll test it, I always use Time speed, sometimes her gui is disappears, but if set your mouse in top-left corner of screen, it reappear again.
Dodging_Rain wrote:
L0771 wrote:
Dodging_Rain wrote:Seems that mining skill also counts removing buildings and structure for their bonus. Meaning that you can duplicate items by constantly removing and placing items down repeatedly.
It only can be possible if that building is a resource

Code: Select all

if event.entity.type == "resource" then
I'm working on the MP.
Strangely I was unable to duplicate fore-mentioned bug again, though I will see if I can do it again later. Something to note is that you can "craft" cursed tree seed by manually planting it and then farming it immediately, giving you farming xp and a chance to duplicate it through the system.
The mining problem maybe is before version 0.0.10 if you mine a resource, mine a building and click in Mining stat, this change shows the last exp gained for resource mined.

The problem with the trees is a very big problem, i'll talk with TreeFarm's owner for this, but obviously is my problem, i want Cursed Exp with 100% compatibility with ALL mods.

Thanks for report all problems, it is very helpful.
Roricorn
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 17, 2014 4:55 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.11

Post by Roricorn »

Stop forgetting to add lines of code in "onplayermineditem" and "onentitydied" every time you create new building, which handled every N ticks. Removing/destroying Cursed Bank/vault leads to error.
Also, removing every gun and all ammo in your gun "toolbar" is kinda not fun.
Anyway, great job at maintainig your mod.
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.11

Post by L0771 »

Roricorn wrote:Stop forgetting to add lines of code in "onplayermineditem" and "onentitydied" every time you create new building, which handled every N ticks. Removing/destroying Cursed Bank/vault leads to error.
Also, removing every gun and all ammo in your gun "toolbar" is kinda not fun.
Anyway, great job at maintainig your mod.
:oops: Ok i forget delete property mineable, now it work... But if you destroy the vault with scrapmod, can duple items, fixed this to :)

Ok, weapons is not removed anymore, i don't need it now.

The only big problem is the farm trees, but i can't do it now.
[s]Now i'll work in version 0.11.6[/s] (Whatever, quiero tachar esto)
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.11

Post by n9103 »

How about putting something like this in as an explicit fix? (less than optimal, implicit references being preferred for flexibility)

Code: Select all

...type == 'resource' && name != 'mature-tree'...
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

n9103 wrote:How about putting something like this in as an explicit fix? (less than optimal, implicit references being preferred for flexibility)

Code: Select all

...type == 'resource' && name != 'mature-tree'...
Because i need compatibility with all mods, mature dytech's tree is "mature-rubber-tree" and my mature tree is "cursed-tree-04" and others like Caffein-Addon and AlienPlant.
I need create an inverface for TreeFarm where returns true or false if is the last state of
glob.treefarm.seedTypes[seedInfo.name].states
I do it tomorrow and present to drs9999.
I think it is the most optimiced version

Thanks for help :)

Update
v0.0.12
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by n9103 »

ah, thought it was specifically a treefarm problem. :oops:
Well, can still go with my explicit check, just expanded to these new types.
Still sloppy, i know. Consider this another weight on my 'time to fully learn Lua' scale. :|
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

n9103 wrote:ah, thought it was specifically a treefarm problem. :oops:
Well, can still go with my explicit check, just expanded to these new types.
Still sloppy, i know. Consider this another weight on my 'time to fully learn Lua' scale. :|
Is my problem by use the treefarm :roll:
Is lua used in "real life"? I was started to learn with this mod.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by drs9999 »

L0771 wrote:
n9103 wrote:ah, thought it was specifically a treefarm problem. :oops:
Well, can still go with my explicit check, just expanded to these new types.
Still sloppy, i know. Consider this another weight on my 'time to fully learn Lua' scale. :|
Is my problem by use the treefarm :roll:
Is lua used in "real life"? I was started to learn with this mod.
I would be glad to help, but after reading it three times I still don't understand the problem or what it has do with treefarm...
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

drs9999 wrote:
L0771 wrote:Is my problem by use the treefarm :roll:
I would be glad to help, but after reading it three times I still don't understand the problem or what it has do with treefarm...
We here (in my town) say "if you do nothing, nothing goes wrong" --> "if i don't do this mod, would not have bugs"

You answered before than expected (drs9999 read my post, i'm happy *-* I use your mods since I started )


Ontopic, in my mod, you earn experience each resource mined, each meter walked, each tree cutted.
Now i have a problem if i plant a tree and cut this, i earn experience; with this if i plant and cut the same tree, can farm experience and items.

To do this, I need a interface in TreeFarm to know if the tree is the last state, and only last state gain experience and other bonuses.
I think with a interface like this can work, i don't tested, i wrote this just now.

Code: Select all

getTreeState = function(tree)
	local seedTypes = glob.treefarm.seedTypes
	for k, v in pairs(seedTypes) do
		for i = 1, #v.states do
			if v.states[i] == tree.name then
				return {state = i, total = #v.states}
			end
		end
	end
end,
I'm new here, maybe this is wrong :/

Thanks for help, and sorry for taking so long, i wrote all by translate... My english is bad.

EDIT: It work, but i don't know if can optimize.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by drs9999 »

Ah ok, got it.

I haven't tested it, but I doubt that calling interfaces frequently is a good idea performance-wise.

However what I could do is adding an interface that returns the complete seedTypes-table.

You could call it just once a game is started or loaded and parse the table for the needed information, in this case the last growingstage for each plant.

I like the idea, because it's very universal. E.g. you also have access to the growingTime, so you could make the experience gain depending on it.

If you want to test it (actually it's a no-brainer ;)):

Code: Select all

readData = function()
		return glob.treefarm.seedTypes
	end
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by n9103 »

OH, my bad.
I thought the problem was tree farms harvesting trees was generating experience. :oops:
I'll just shut up and go back to lurking the thread now. ;)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
Dodging_Rain
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Nov 13, 2014 5:48 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by Dodging_Rain »

Is there a remote call to force the gui to appear? One of my save doesn't seem to show the cursed exp gui even when I save and reload.
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

drs9999 wrote:If you want to test it (actually it's a no-brainer ;)):

Code: Select all

readData = function()
		return glob.treefarm.seedTypes
	end
Ok, thanks you, with this name (readData)? I implement this for my next update

Code: Select all

if (remote.interfaces.treefarm) and (remote.interfaces.treefarm.readData) then
	...
end
I call it on oninit and a option check in options.
And with this i can give a % of exp if state is > 1.
It this optimized?
n9103 wrote:OH, my bad.
I thought the problem was tree farms harvesting trees was generating experience. :oops:
I'll just shut up and go back to lurking the thread now. ;)
What? If you are very helpful :cry: Really
Dodging_Rain wrote:Is there a remote call to force the gui to appear? One of my save doesn't seem to show the cursed exp gui even when I save and reload.
No, because i don't know who has called the interface, and i can't reset all guis in a remote.call :(
I'm sorry, i've broken this on my last "optimization", more than 100 lines unused, but i forget this problem, i can "ask" if the interface is showing on load, for the next update.
Thanks for report it.
oktabyte
Inserter
Inserter
Posts: 28
Joined: Fri Nov 28, 2014 3:00 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by oktabyte »

It seems that this mod sometimes causes desynchs in multiplayer and replay...
In multiplayer (2player), if the host (game.players[1])has the gui open for skills and that gets updated (exp, seen mainly with crafting during crafting), it sometimes causes desync. In replay i cannot tell (don't have time to watch 45 minutes over and over just to see what exactly causes it...)
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

oktabyte wrote:It seems that this mod sometimes causes desynchs in multiplayer and replay...
In multiplayer (2player), if the host (game.players[1])has the gui open for skills and that gets updated (exp, seen mainly with crafting during crafting), it sometimes causes desync. In replay i cannot tell (don't have time to watch 45 minutes over and over just to see what exactly causes it...)
Ok, i'll work on this now.
And isn't necesary a big report, i only want to know what happen, the code is very simple, but i can't review all code every update.

Thanks for report.
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by drs9999 »

L0771 wrote:Ok, thanks you, with this name (readData)? I implement this for my next update

Code: Select all
if (remote.interfaces.treefarm) and (remote.interfaces.treefarm.readData) then
...
end

I call it on oninit and a option check in options.
And with this i can give a % of exp if state is > 1.
It this optimized?
I'm going to name it "GetSeedTypesData", probably. And release it tomorrow.

I would also call it in the OnLoad-event, because OnInit is just called once (when a new game is started).
oktabyte
Inserter
Inserter
Posts: 28
Joined: Fri Nov 28, 2014 3:00 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by oktabyte »

Found a crashbug: when sharing a map (send save + mods folder to friend, he tries to start gets the message) with a friend the map said
Error while runnung the event handler:
Curse-Exp \control.lua:659: attempt to
index field "?" (a nil value)
During loading of the map.
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by L0771 »

oktabyte wrote:Found a crashbug: when sharing a map (send save + mods folder to friend, he tries to start gets the message) with a friend the map said
Error while runnung the event handler:
Curse-Exp \control.lua:659: attempt to
index field "?" (a nil value)
During loading of the map.
Your friend must have a Username, if he want all your stats use the same nick (it is a problem on multiplayer too, but is a factorio problem, not a bug, but can login 2 players with the same nick). If he play with other nick, no problem, it is like multiplayer (but with only 1 player), if he load the game with other nick, the mod automatically sets new variables, but if he haven't a nick, this variables set to "", and this give a error when i want read it.
For now, this only crashes and show a message, i don't know how to kick of multiplayer game and how to know if it is multiplayer game :p

Code: Select all

if v.name == "" then
	globalPrint("Use a nick in Options > Others > Multiplayer Username, now crash :(")
	v.insert({name = "cursed-tree-00",count = 0})
end
I finished v0.0.13 last night but i'll post when drs9999 published his update ;)

The problem with the gui happen sometimes, i can't test, but i think it is solved...
And now can use /c remote.call("cursed","resetgui") if any player calls this interface, resets all brokens guis.


And for Treefarm i do this
this
EDIT: If it version works fine, this is the last version of 0.0.x
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [MOD 0.11.5] Cursed Exp - v0.0.12

Post by drs9999 »

L0771 wrote: I finished v0.0.13 last night but i'll post when drs9999 published his update ;)
Done ;)
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [MOD 0.11.6] Cursed Exp - v0.0.13

Post by L0771 »

drs9999 wrote:Done ;)
Thanks you.

Update
v0.0.13
This is the last release for 0.0.x, in the next i add Cursed Tombs (a mini mod untested) with an adaptation for single player (can revive, but one does not simply die and revive), this is programed in my cellphone for now ... And maybe add the wall, I was thinking in a big change of walls ( :) )

I have an exam on Wednesday, and after that, i back here
Post Reply

Return to “Mods”