Forum

> > Stranded II > Scripts > Scripting Questions
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Questions

2,429 replies
Page
To the start Previous 1 252 53 54121 122 Next To the start

old Re: Scripting Questions

jayjay
User Off Offline

Quote
i try do dialogue for trade script. and dialogue must be in .s2s format. how can i do this?? text editor doesn't work.

old User

Guest

Quote
jayjay has written
i try do dialogue for trade script. and dialogue must be in .s2s format. how can i do this?? text editor doesn't work.


You should use Notepad++. It works really well.


Anyways, I'm working on scripting an object and need help

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//~menudialogue
page=start
title=Techmanual
text=start
blah..blah..blah..
text=end
button=CH1.1,Chapter 1 - Buildings
button=action:close,Close the Techmanual

page=CH1.1
title=Techmanual - Buildings
(I want to display a bitmap picture here)
button=CH1.2,Page 2
button=CH1.3,Techtree
button=menudialogue,Back to Chapter Menu
button=action:close,Close the Techmanual

old Re: Scripting Questions

Gradir
User Off Offline

Quote
DontKnowToScript has written
@Gradir
the spawn command is like spawn=ID,Amount of days to grow... (and others) so change time to grow.
trade=end

Nah I ment speeding them up in a script, only in one moment of the game (to be exact, on the beginning of a map, to make them spawn some fruits already. I can't find the proper command for it through. Maybe I should make it another way - by changing the day on startup, but there can be problems)

I use Notepad++ too and I like it

Ah, and by the way
I saw one day someone made a mod, where the skills and combinations that aren't possible for the player yet are not displayed. I wish I could add such thing to my mod, anyone know who made the attempt? Or how to do such thing?
edited 1×, last 30.10.08 11:52:08 pm

old Re: Scripting Questions

Rune
User Off Offline

Quote
Hai!

I could not find an answer to this elsewhere. Is it possible to force an item to not stack with other items of the same type?

/Cheers

EDIT: Seems I have to work around it then, thanks for the quick reply Gradir, appreciated.
edited 1×, last 31.10.08 01:16:18 pm

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
i dont think there is a command to attach an item,but in editor click on the object and click sapwn.it will speed up the growth of a fruit in one day.but no command in random island.usually i play my own "free play" maps as you can see in my mod in the free play savegame and map. i dont like random islands.

old Re: Scripting Questions

jayjay
User Off Offline

Quote
i have notepad++ and i make dialogue for trade script. when i save it i cant use it in game. its not .s2s format so how can i save it in .s2s format??
edited 1×, last 31.10.08 08:10:36 pm

old Re: Scripting Questions

Kirby
User Off Offline

Quote
Mark the file, right-mouse click, rename.
Write: file.s2s (file is an example, write for file an other name - call it what you like.

But you musn't rename it. I use ever *.txt files. It works, of course.
edited 1×, last 31.10.08 10:36:28 pm

old Re: Scripting Questions

Guest

Quote
I'm working on scripting an object and need help... I asked earlier but it seems nobody got my post... I'm trying to make a book with pictures and text you can turn pages and whatnot... but I'm having a problem with putting a picture in dialogue...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//~menudialogue
page=start
title=Techmanual
text=start
blah..blah..blah..
text=end
button=CH1.1,Chapter 1 - Buildings
button=action:close,Close the Techmanual

page=CH1.1
title=Techmanual - Buildings
(I want to display a bitmap picture here)
button=CH1.2,Page 2
button=CH1.3,Techtree
button=menudialogue,Back to Chapter Menu
button=action:close,Close the Techmanual

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
What you want to do is possible but it isn't documented. It only was mentioned in the german worklog a long time ago.
Here is a picture DC uploaded to explain how it works. Un fortunately it's in german, but I think you'll figure it out anyway.

old Re: Scripting Questions

Guest

Quote
Yes I've used that method before... but that method is if you want it to get added to the diary... what I'm trying to do is kinda what i think Builder figured out how to do with the desk... only what I'm trying to implement is that in a book you can carry around with you.

i have a model of a book... not skinned or textured... don't know how to do that... and the icon of the book. I have bitmaps of the pages of the book... but using the dialogue like the one that the pirate uses seemed a whole lot easier to figure out than the scripts Builder was using... I just don't know how to implement pictures in dialogue mode or even if it can be done.

old Re: Scripting Questions

Guest

Quote
I'm trying to make a cooking skill in game and I want to make it so you can't make juice or wine till you get to a certain skill level.
These are the values I added to the game.inf to get it to work.

1
2
3
4
5
6
7
8
9
10
//Lock combis (see combinations_xxx.inf)
		if (skillvalue("wood")<25){
			lockcombi "branch";
		}
		if (skillvalue("cooking")<150){
			lockcombi "juice";
		}
		if (skillvalue("cooking")<250){
			lockcombi "wine";
		}

and also the cooking skill code:

1
2
3
4
5
6
7
8
9
on:skill_cooking { msgbox "Skill Info","sys/skillinfos/cooking.inf";}
	on:iskill_cooking {
		incskill "cooking",1,"Cooking";
		$tmp=skillvalue("cooking");
		if ($tmp==150){ event "skillup","global"; unlockcombi "juice"; }
		if ($tmp==250){ event "skillup","global"; unlockcombi "wine"; }
		if ($tmp==300){ event "skillup","global";}
		if ($tmp==450){ event "skillup","global";}
	}

However when in game and I have enough skill to unlock these two combinations it still comes up with the message "Not possible yet". What is it that I am doing wrong? any help would be appreciated.

Thank you,
Apostle.
To the start Previous 1 252 53 54121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview