Forum

> > Stranded II > Scripts > Bones waste system
Forums overviewStranded II overview Scripts overviewLog in to reply

English Bones waste system

14 replies
To the start Previous 1 Next To the start

old Bones waste system

Ayrk
User Off Offline

Quote
Straight to the point: I want to know if there is any way to write a script to generate bones as a waste of eating large meat; both raw and fried...

So far I've tried with the gen and alteritem commands... but it hasn't worked. So, please, tell me if it is possible; and if so, where am I wrong.

1
2
3
4
5
6
//Eat
	on:eat {
		process "eating",1000;
		eat 5,20,10,0;
		alteritem 71,1
}

And... (I have not much hope with this one but...)

1
2
3
4
5
6
//Eat
	on:eat {
		process "eating",1000;
		eat 5,20,10,0;
		gen 71,1
}

old Re: Bones waste system

Ayrk
User Off Offline

Quote
Yes, i forgot the ";"... i wrote the codes too fast

BTW: It worked! Dankeschön!

I also wanted to use the bones as fishing hooks. I already have made the .b3d and .bmp files, and have added the item and combination scripts (all work fine)... but i have no clue on how to integrate them on the fishing system.

Any idea?

old Re: Bones waste system

Hurri04
Super User Off Offline

Quote
you could make a combination for which the player has to combine the normal fishing rod (consisting only of a flexible branch and a piece of string) to get a fishing rod with a hook.

if you then also add another combination in which the player can combine these 3 components all at once then this could be the combination to use when creating a fishing rod for the first time if the player already has made a bone fishing hook.

otherwise he'll have to use the first combination without the hook and you could implement that this will give a significantly lover chance to catch something.

also, if I remember correctly, in the standard fishing system looks if the player has certain items in his inventory like insect parts, worm etc. you could edit those to be able to be used as "ammunition" for the fishing rood with hook (but not for the one without hook) and depending on the type of ammunition increase the chance to catch something by some more percent.

but even with the highest percentage chance to catch something you should leave a small chance that the player doesnt catch anything because as the fishin skill increases so does also the chance to catch something.

and if the player doesnt catch something there could be a random chance that he gets the item back which he used as bait.



if you're new to scripting in s2 (which I assume since you just registered on the website) then this might sound like a lot of work but I can assure you it's really not all that much. more so, it should be a good task to learn scripting

old Re: Bones waste system

Ayrk
User Off Offline

Quote
Thanks, I got it.

One last question... (for now);

where is the script that loads the enviroment SFX?
I was scripting some items and then, suddenly, when I test the game, the sfx amb_jungle.wav didn't sound anymore.

The perpetual enviroment silence is driving me really mad.

old Re: Bones waste system

Hurri04
Super User Off Offline

Quote
that's weird...
I thought the audio stuff was mostly hard-coded because I cant remember seeing anything more than the audio infos and maybe some global background sfx settings in the editor...

old Re: Bones waste system

Ayrk
User Off Offline

Quote
Found the problem: a simple ";"
Must be a harcoded bug: whenever it doesn't load any "process" sound (stays muted in a "Process" E.g: "Chopping Log"), then the enviroment sfx gets deactivated.

However, now I found another problem.
Is there any line limit for the scripts to be loaded in the game? Because in the combinations_basic.inf I have added some item combinations more (4) and the last one doesn't load.

I wanna add 5 more combinations, but if it can't support more than 3, then i don't know how.

old Re: Bones waste system

Nova
User Off Offline

Quote
There should be no limit on lines. You could try another .inf file, like combinations_new.inf

Post your version of the combinations_basic.inf file and we will take a look. Maybe we can find the error.

old Re: Bones waste system

Ayrk
User Off Offline

Quote
Everything is exactly the same from the standard game up to the chocolate paste combination. But the last one doesn't load. I've even tried switching positions between the last ones, and the result is always the same: The last one doesn't get loaded by the game.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
### chocolate paste (Paste + Cacao)
combi=start
id=chocolatepaste
req=82
req=68
gen=115,1
script=start
	play "mat_flesh3.wav";
	process "mixing dough",1000;
script=end
combi=end

### small Meat (Meat + Matchet)
combi=start
id=small Meat
req=9
req=28,1,stay
gen=11,4
gen=71,1
script=start
	play "mat_flesh1.wav";
	process "cutting meat",1000;
script=end
combi=end

### Small Meat (fried) (Meat (fried) + Matchet)
combi=start
id=small Meat (fried)
req=10
req=28,1,stay
gen=12,4
gen=71,1
script=start
	play "mat_flesh1.wav";
	process "cutting meat";1000;
script=end
combi=end

### Nails (Ironbar + Hammer)
combi=start
id=nails
req=86
req=30,1,stay
gen=126,20
script=start
	play "workmetal.wav";
	process "processing metal",1000;
script=end
combi=end

### Fabric (Skin + Needle + Cord)
combi=start
id=Fabric
req=49,10
req=96,5
req=122,1,stay
gen=123
script=start
	play "mat_leaf1.wav";
	process "sewing fabric";1000;
script=end
combi=end

From here on I want to add some food frying combinations. These:
PS: The item 127 is a frying pan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
### Meat (Fried)
id=Meat (fried)
req=9
req=127,1,stay
gen=10
script=start
	//Fry!
	if ((count_inrange("state",5,50, "self")+count_inrange("state",4,50, "self"))>0){
		play "fizzle.wav";
		process "frying",1000;
	}else{
		msg "I need fire to fry this!",3;
		speech "negative";
		skipevent;
	}
script=end
combi=end

### Small Meat (Fried)
id=small Meat (fried)
req=11
req=127,1,stay
gen=12
script=start
	//Fry!
	if ((count_inrange("state",5,50, "self")+count_inrange("state",4,50, "self"))>0){
		play "fizzle.wav";
		process "frying",1000;
	}else{
		msg "I need fire to fry this!",3;
		speech "negative";
		skipevent;
	}
script=end
combi=end

### Fish (Fried)
id=fish (fried)
req=89
req=127,1,stay
gen=90
script=start
	//Fry!
	if ((count_inrange("state",5,50, "self")+count_inrange("state",4,50, "self"))>0){
		play "fizzle.wav";
		process "frying",1000;
	}else{
		msg "I need fire to fry this!",3;
		speech "negative";
		skipevent;
	}
script=end
combi=end

### Omelette
id=Omelette
req=124,3
req=127,1,stay
gen=125
script=start
	//Fry!
	if ((count_inrange("state",5,50, "self")+count_inrange("state",4,50, "self"))>0){
		play "fizzle.wav";
		process "frying",1000;
	}else{
		msg "I need fire to fry this!",3;
		speech "negative";
		skipevent;
	}
script=end
combi=end

But... even if I create another .inf file (Wich I've tried already, if not i wouldn't be posting anything since the forum is my last resource ) What can I do for the game to lad it?

old Re: Bones waste system

Nova
User Off Offline

Quote
As far as i know, Stranded loads every file which starts with the associated string. "combinations_***.inf" or "objects_***.inf" or ...

old Re: Bones waste system

Ayrk
User Off Offline

Quote
Hahahaha! Right ... But actually I haven't even try those yet.

My problem is with the last one on the first raw of combinations (The item called "Fabric"). As I said, no matter wich one I put there in the end (I've tried placing the Nails, and the small meat), none combination in that place seems to want to work.

old Re: Bones waste system

Hurri04
Super User Off Offline

Quote
from my extended experience with s2 script errors I can tell you that when something from the definition files doesnt work that doesnt mean it has something to to with the definition of the related item. it might as well be that you have made an error in another definition in that specific file.

I recommend you use "Notepad++" to view the files you modified and use the search function (CTRL+F) which has a "count" button in the same window. please make sure you have
• as many "combi=start" lines as "combi=end" lines
and
• as many "script=start" lines as "script=end" lines
and post the results.

forgetting to copy one or some of those is probably the most often done mistake which everyone makes once in a while.

if the numbers are uneven/odd you will still have to track down where the errors are by hand because unfortunately the s2 console often doesnt give sufficient information let alone automated correction...

old Re: Bones waste system

Ayrk
User Off Offline

Quote
No, That's all fine, four elevens.

I've already created another .inf file that seems to work... not the way I would like, but... you have what you have...

Anyway... I don't know if it's just me, or I've an incredibly bad luck. But everytime I solve something another stuff pops up to bother me even more!

Have any of you ever heard of lions wich walk in circles around you and don't lock you directly as a target?

First I thought it was something I did in its unit script, but all was fine. Then I unistalled the bloody game, and when I reinstalled it ... Surprise! They still walked around me when I tested the game without any mod

I guess my stranded has autoperverted into a troll game
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview