[Factorio 0.14.x] Curse Exp And Cursed Classes

Topics and discussion about specific mods
Post Reply
PhoNoTheSky
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 05, 2015 4:44 am
Contact:

[Factorio 0.14.x] Curse Exp And Cursed Classes

Post by PhoNoTheSky »

Cursed Exp Github Here / Source
Orginal Forum Here
Cursed Exp
Cursed Classes
Change Log
Report A Bug or Problem
Known Bugs or Problems
Factorio Version Support
Last edited by PhoNoTheSky on Mon Oct 10, 2016 8:09 pm, edited 17 times in total.
Check Out Cursed-Exp: Here

Darkanrath
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jan 09, 2016 2:14 pm
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by Darkanrath »

Sadly half of the experience is lost without Cursed Classes being updated. Thanks though for the update. I appreciate it. :D

Lactor
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jan 29, 2016 1:43 am
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by Lactor »

Image
Image

with chatspamming after crafting

Mod Version Cursed Exo 0.4.5, Cursed Classes 0.0.1
With Factorio Version 12.20

zanetano
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Feb 19, 2016 11:40 pm
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by zanetano »

Game Version: 0.12.20(Build 17489, win64)
Mod Version: Cursed-Exp_0.4.5 / Treefarm-AC_0.2.3 / Treefarm-Lite_0.2.4 (no other mods)
Picture or What it says:
Image

it happened when i tried to load a saved multiplayer game.

JohnGalt
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Feb 01, 2015 12:47 am
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by JohnGalt »

I tried the latest (0.4.5) version with factorio 0.12.29 and can't play very long before getting a scripting error when it tries to give me a bonus for crafting/mining/harvesting etc.. I love this mod so much but I just can't figure it out, tried editing all sorts of stuff in the code but have no idea what I'm doing. If anyone can work with me to solve this problem I'll send $5 through paypal or even willing to support through patreon if someone will keep this mod working for me. This mod adds more to the game than any other mod I've seen, I just wish it had more support.
Attachments
cursederror.png
cursederror.png (1.33 MiB) Viewed 20398 times

Krishonk
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Apr 22, 2016 5:14 pm
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by Krishonk »

Sorry to respond to an old post, but I like the idea of this mod and also dabble in programming just enough to be able to pretend to program. Far as I can tell, the "attempt to call field item_prototypes" error is getting pulled up when the mod tries to display some text when you get a bonus item from a skill. The following block of code appears in the files on_preplayer_mined_item.lua, on_player_mined_item.lua, and on_player_crafted_item.lua:

Code: Select all

if global.cursed[player.name].opt[6] == true then
player.print({"msg.cursed",{"msg.item-bonus",newtp, game.item_prototypes("cursed-talent-part-" .. num).localised_name}})
game.surfaces.nauvis.create_entity({name="flying-text", position=player.position, color = player.color, text={"msg.item-bonus-flying",newtp , game.item_prototypes("cursed-talent-part-" .. num).localised_name} })
end
I don't know any Lua, so, my brute-force, inelegant solution to the problem is to unpack the .zip, go to those files, put -- at the start of each of the lines in those blocks, and re-package it. This comments them out and tells the game to just skip over that code. That'll at least let the game keep going in those instances, but it's still got a lot of tinkering that it needs that I just don't know how to do.

I've been looking at other mods to see if I can get examples for how things are coded in scripts that currently function, but I haven't seen any that use scripts to the extent that this mod does. If I find some, I'll see if I can take a crack at fixing things up myself, if development on this mod isn't planned to continue (but I hope it is!). As it stands, I have no idea how to make that pretty, or how to fix loading a saved game, but I'll keep looking.

JohnGalt
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Feb 01, 2015 12:47 am
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by JohnGalt »

Any help is appreciated, I'll give what you said a try. My only "solution" so far has been to remove the access to those files altogether which pretty much ruins the whole experience because it disables the interface to pick skills.

DexterBacklash
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun May 15, 2016 5:43 pm
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by DexterBacklash »

To fix the console spam. Go to scipt on_tick.lua

Search for this line: game.player.print(( talents[5][4].now / 200 + (stats.defence.level * datos.resDefence) / 100) * 60 * 3)

And delete it. It took me two hours of searching around to get this one out. It might have some function in game, but none that I can see.

Works with older versions as well. The other bugs still remain. I hope one day, someone will update this project as it really improves the game.

Tim2162286
Burner Inserter
Burner Inserter
Posts: 17
Joined: Mon Jun 15, 2015 2:34 am
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by Tim2162286 »

JohnGalt wrote:I tried the latest (0.4.5) version with factorio 0.12.29 and can't play very long before getting a scripting error when it tries to give me a bonus for crafting/mining/harvesting etc.
To fix this issue i think all you need to do is replace

Code: Select all

game.item_prototypes(<Some Code>).localised_name
with

Code: Select all

game.item_prototypes[<Some Code>].localised_name
specifically, the flag for game.item_prototypes must be in brackets [], not parentheses ().

[Edit] Fixed script files, these are only the ones i found, there may be some that i missed, but based on the little testing i have done, it shouldn't crash whenever you get a bonus item. just replace the script files with these, and it should cover the worst of the problems, later I will go through all the scripts to double check there are no other instances of game.item_prototype
Attachments
on_preplayer_mined_item.lua
(33.8 KiB) Downloaded 195 times
on_player_mined_item.lua
(1.62 KiB) Downloaded 200 times
on_player_crafted_item.lua
(9.89 KiB) Downloaded 189 times

cryok1ng
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Aug 21, 2016 11:35 pm
Contact:

Re: [Factorio 0.12.12] Curse Exp

Post by cryok1ng »

if anyone still follows this post im new to the mod got any clue how to fix these 1 is when i kill a biter other is after i place a blood tank
pic 2.png
pic 2.png (1.06 MiB) Viewed 16825 times
pic 1.png
pic 1.png (1023.15 KiB) Viewed 16825 times

DreamSmith
Inserter
Inserter
Posts: 42
Joined: Wed Mar 26, 2014 7:43 pm
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by DreamSmith »

New error, base 0.14, Bio-industries 1.4.5, Cursed-Exp-Remake 0.5.4. Action: Built an arrow.
12-10-16-error.jpg
12-10-16-error.jpg (105.71 KiB) Viewed 15646 times

Alukat
Inserter
Inserter
Posts: 26
Joined: Mon May 18, 2015 11:16 pm
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by Alukat »

latest stable version of Factorio (with many mods active, if that even matters):
Attachments
cursed exp.jpg
cursed exp.jpg (88.88 KiB) Viewed 15039 times

Sponsch
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 15, 2017 3:49 am
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by Sponsch »

I have the problem that if i try to load a game begun with Cursed-exp and Cursed Classes i get this error while loading:
Error while running the on_load: __Cursed-Classes__/scripts/startclass.lua:26: attempt to index global 'game' (a nil value)

when i try to load another game only begun with Cursed-exp i get this error:
Error while running the on_load: __Cursed-Exp-Remake__/scripts/on_load.lua:5: attempt to index global 'game' (a nil value)

Any help would be appreciated.
Factorio version 0.14.22
Cursed Classes 0.1.0
Cursed Exp Remake 0.5.4 downloaded from github

nielskool
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Jan 04, 2017 11:32 pm
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by nielskool »

game :: LuaGameScript: This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with LuaBootstrap::on_load.

This addon tries to acces the game parameter while loading a saved game.
During init there is no problem, there it is allowed/possible.

Source:http://lua-api.factorio.com/0.14.22/

think it can be fixed by replacing the onload.main function to:
function main()
loadClasses.main()
end

startclasses is redundant because also called on char creation, I guess.

//edit
This worked for me.
Will post more updates here.

//edit2
When crafting arrows I got an error in mix.lua
player table error something.

fix mix.lua:
line 15: return game.players[name]
This game rocks! First game I bought in 10 years or so.
Always try games first through torrents.... but this game is one of the first i deemed worthy to buy!

Sponsch
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 15, 2017 3:49 am
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by Sponsch »

Now i get a different error.

__Cursed-Exp-Remake__/control.lua:144: '(' expected near 'main'

I get this error while creating or loading a game.

I changed it to this after some fiddling:

script.on_load (function main()
loadClasses.main()
end)

I changed it in the control.lua that should be coreect right?

PhoNoTheSky
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 05, 2015 4:44 am
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by PhoNoTheSky »

It has been awhile since i last updated this. but anyone want me to update it to version 0.15
Check Out Cursed-Exp: Here

JohnGalt
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Feb 01, 2015 12:47 am
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by JohnGalt »

I for one would love to see an update to 15 for this one. Been a long time favorite mod of mine. Also willing to toss in a little financial incentive if it helps.

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: [Factorio 0.14.x] Curse Exp And Cursed Classes

Post by L0771 »

Darkanrath wrote:Sadly half of the experience is lost without Cursed Classes being updated. Thanks though for the update. I appreciate it. :D
Is working standalone in the next update (0.5.1), i'm working to plant seeds and grow trees too, a lot improvements and a much less lag, like a real mod, is possible without crashes? We'll see soon...
Krishonk wrote:I've been looking at other mods to see if I can get examples for how things are coded in scripts that currently function, but I haven't seen any that use scripts to the extent that this mod does. If I find some, I'll see if I can take a crack at fixing things up myself, if development on this mod isn't planned to continue (but I hope it is!). As it stands, I have no idea how to make that pretty, or how to fix loading a saved game, but I'll keep looking.
No, there are not many similar mods that add entities that doesn't exists...
I went back to update my mods and maybe create another little monster (Big mod)
DexterBacklash wrote:I hope one day, someone will update this project as it really improves the game.
Yep, i'll do that :)
PhoNoTheSky wrote:It has been awhile since i last updated this. but anyone want me to update it to version 0.15
Thanks you and sorry for make you read my code, i have eye hemorrhage trying to read my old code :oops:
JohnGalt wrote:I for one would love to see an update to 15 for this one. Been a long time favorite mod of mine.
<3 Sorry, i'm back, i'm never forgot factorio, it was just a break


All others posts with bugs are already solved, i want a cursed without bugs... And more blood

Post Reply

Return to “Mods”