[OSP] [Script] [Crom system] : Equipped Items deterioration

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

[OSP] [Script] [Crom system] : Equipped Items deterioration

Post by cromcrom »

....
Last edited by cromcrom on Thu Nov 20, 2014 4:05 pm, edited 2 times in total.
A trip of a thousand leagues starts with a step.
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: [OSP] [Script] Crom systems : Equipped Items deteriorati

Post by NutJob »

I like the idea, thanks for this post.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by Eleven Warrior »

That is 1 awesome Script CromCrom.

1- Will the Weapons when they hit monster deteriorate to?
2 - When the items can no longer be used can they be put into the Party's Inventory or if they have no space it goes on the floor?
and a Anvil repair system would be awesome eg: You pay Blacksmith gold, silver, copper to fix the item that's broken, or the party could fix it using the Anvil but may need item to repair them EG: wood, leather, iron ore etc.....

Anyway just something t think about, I will be using this script for sure and thxs for this :D
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by cromcrom »

I am glad you guys like it :-)
@ Eleven Warrior:
This is a very basic script.
1/ No. I didn't check that. might be possible tho :-)
2a/ I might check the onEquip stuff, and if the item is detriorated, it falls to the ground when you try to equip it. Lets give it a look :-)
2b/ I have this repair system in TLC for LOG, and plan to add it in TLC2. I use it in combination with my skill system (tinkering, armor crafting weapon crafting, and so on...). The players repair it "for free", but the overall solidity is reduced with each repair. The better the skills, the better the repair. As for requiring crafting components, or a Smith, I am sure it could be done.
A trip of a thousand leagues starts with a step.
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by Eleven Warrior »

Hi CromCrom I hope you can do it. I saw your Scripts in TLC and I have to say, to me it was reading another language. I did learn some things from you thank you and used most of you custom assests.
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by cromcrom »

I tried a "drop when broken" system, but this spawn call

Code: Select all

					local itemName = item.go.name
					local itemID = item.go.id
					champ:removeItemFromSlot(slotnumber)					
					party.go:spawn(itemName, party.go.level, party.go.x, party.go.y, party.go.facing, party.go.elevation,itemID)
The broken item do spawn on the ground, but it seems to create a new item ID anyways. So it doesn't appear in the table, and the system considers it to be new, and so starts the whole process again.

And I haven't seen any "dropItem" function.
A trip of a thousand leagues starts with a step.
User avatar
Mysterious
Posts: 226
Joined: Wed Nov 06, 2013 8:31 am

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by Mysterious »

Maybe you might have to rely on putting the damaged item into the inventory, but if the inventory is full then maybe a hudPrint("you have no room for this damaged shield.") I guess we will have to wait for the references to come out :)
User avatar
sapientCrow
Posts: 608
Joined: Sun Apr 22, 2012 10:57 am

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by sapientCrow »

nice addition cromcrom

really looking forward to it in TLC2

thanks
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by Lark »

Just guessing here as I've not played with any of this yet, but champ:removeItemFromSlot(slotnumber) doesn't destroy the item, does it? And if it's not destroyed, then wouldn't party.go:spawn(itemName, party.go.level, party.go.x, party.go.y, party.go.facing, party.go.elevation,itemID) create a new item ID? Other things that I've not mucked with enough to know, but can't you set the position of an object through setWorldPosition? Just half-baked ideas. Good luck! -Lark
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: [OSP] [Script] [Crom system] : Equipped Items deteriorat

Post by cameronC »

This is a very useful and exciting system!
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Post Reply