Forum

> > Stranded II > Mods > Creating a mod
ForenübersichtStranded II-Übersicht Mods-ÜbersichtEinloggen, um zu antworten

Englisch Creating a mod

14 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
I've been with this site for many years, and only now have I decided to make a Stranded II mod. I don't know when I'll finish it, or if I'll finish it, but here's what I have planned:

- Fix all broken translations (vine instead of liana, broken english, etc)
- Clean up the item descriptions, fix bad grammar, and even make it feel a bit more lively by adding modern media references and other remarks that make it feel more realistic.
- Change a few crafting recipes and maybe give non-functional items (crystal blade, bloodleaf, etc) a purpose.
- Remove all drug-related items (hemp leaf, hemp plant, joint, etc) from the game. I remember many years ago a user really wanted this, but was ignored. I didn't do it because of him, but just because I wanted to.

However, I need some help with that last point. I thought it would be as easy as going into each of the maps, deleting all the items/objects, then removing the entries in the system files. Then I realized a few quests on one of the islands requires you to farm hemp and make joints with it.

How would I go about changing those items to different ID's so I could complete that last point? I never was good at scripting.

alt Re: Creating a mod

ModJuicer
Super User Off Offline

Zitieren
user SlyCooperReloadCoded You have my permission to use my platform as a platform for your mod. It is regular stranded II but with better graphics.
Download Link
p.s. Removing the hemp is far too hard to do. You can remove joints and replace them with hemp rope. Medical fact: eating hemp does not get you high, but it does help depression. Maybe you could remove the 'fuddle' you get from eating the hemp and replace with a boost of some sort. Overall, I think that hemp is not worth it to remove, and if I had the choice, I'd keep it because it does not, in my opinion, encourage drugs. Your health even goes down in S2 when you smoke a joint or ear the leaf plain. In my opinion eating the leaf plain should not lower your health and wild hemp is a lot less potent than farmed hemp. (Lower THC higher and higher anti tch CBD)
Thanks,
     See ya..
p.s. if you get rid of hemp, great. I just hope it doesn't create holes in the mod...
2× editiert, zuletzt 06.09.18 21:22:07

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
Additionally, you could 1) simply do a file search for the terms Hemp and Joint and change their names to Tobacco and Cigarette.

It still a negative feature but not illegal as Hemp in some countries.

Also, 2) the model for a Hemp Plant and the Hemp Leaf could be changed to another plant n leaf in the game, that maybe looks more like tobacco. this way the ID is the same, you just changed the name and model so all the combinations and the "hemp task" can be performed normally...only as a "tobacco task".

Google it- Tobacco, and pick a plant in the game that looks similar and set it's "scale" to size it to your preference. You can use "color" in their definitions and change the regular leaf "color" to a brown dried tobacco leaf maybe.

If I remember right the Hemp plant would be in the objects_bushes.inf file, and the Hemp leaf in the items_edible.inf file.

Good luck with your mod!

P.s. I forgot to mention, 3) you would probably need to change the Hippy's text for the Hemp task to reflect a Tobacco task...he would be located in the units.inf file.
3× editiert, zuletzt 30.08.18 11:41:43

alt Re: Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
I don't mind that it would be hard to edit the quests to use other items. After all, if there's no challenge then it's not fun for me. How would I do it?

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
Eh, to much to explain in detail, heres the short version...you will have to doodle around with it and make the mod do what your expecting.

1) open the 3 files I listed in bold text above with an editor like Notepad or Notpad++. They are in the /sys folder

2) Scroll down and find the 4 things you need to change: Hemp Plant, Hemp Leaf, Joint, Hippy

3) Change the NAMES ( e.g. "name=Tobacco Plant" ), Change the MODEL ( e.g. "model=sys/gfx/fern_plant.b3d" )

4) The Hippy would have some text explaining the quest to the player...change the text so it reads what you want.

5) Save the files: In your editor click File top left and then SAVE.


Lastly, when the player smokes the cigarette you don't want them to get high, so you should delete the line that reads addstate "fuddle"; in the JOINT where it reads on:use{ or on:eat{

Now you should "test" the results and make sure it works. Play up to the Hippy's Quest and SAVE your game before you do the quest. Do the quest and if you get an error, fix it. Then LOAD your SAVE and try testing again. Keep doing that until you get the results you want, with no errors.
1× editiert, zuletzt 30.08.18 22:02:26

alt Re: Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
I'm starting to work on it. Actually JasJack67 that's not what I wanted to do. I wanted the natives to ask me to bring them other items, like bread or fruit, instead of hemp and joints. I'm assuming that's a matter of switching around item ID's. After I do this I can remove all hemp items from the map and the quest can stil work as intended.

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
well, if Hemp Plant is ID 134, all the hemp on the map is ID 134. In theory above, if you change the name and model of ID 134 then there is no Hemp Plant. They would all be replaced with the new name and model you made it... in the game.


Zitat
I'm assuming that's a matter of switching around item ID's. After I do this I can remove all hemp items from the map and the quest can stil work as intended.


Yes, you could switch the ID's to bread or grapes, just changing the name and model of hemp, leaf, or joint...to the new name and model of bread or grapes, would be a alternative.
---------------------------------------------------------------------
UPDATE; There is a Trading Menu script for him in the /sys/scripts Folder, but I see nothing referencing it in the Unit-WeedGrandpa.

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
page=start
title=Grandpa
text=start
Hey you. How's it going?
text=end
button=trade,I want to trade.
button=action:close,Don't bother me!

page=trade
title=Trade with grandpa
### Hempleaf -> Cookie
trade=start
sell=83,5
buy=66,1
trade=end
### Hempleaf -> Trunk
trade=start
sell=83,10
buy=7,1
trade=end
### Hempleaf -> Grapes
trade=start
sell=83,15
buy=45,3
trade=end
### Hempleaf -> Grain Pile
trade=start
sell=83,15
buy=42,3
trade=end
### Hempleaf -> Plums
trade=start
sell=83,15
buy=116,3
trade=end
### Hempleaf -> Coconut
trade=start
sell=83,20
buy=27,3
trade=end
### Hempleaf -> Banana
trade=start
sell=83,20
buy=14,3
trade=end
### Hempleaf -> Cacao Fruit
trade=start
sell=83,25
buy=67,3
trade=end
### Hempleaf -> Coffee Fruits
trade=start
sell=83,25
buy=70,3
trade=end
button=action:close,Cheers!

Sell=item,amount
buy=item,amount

So change the Hempleaf name, and the Hempleaf ID 83 to what ever item name and ID you want to trade.

In the /sys folder open the random_endless.inf files and delete the Hemp Plant ID 134 from the bottom in the "stuff" section. Then no Hemp will spawn when the map is created. For the random maps that is.
7× editiert, zuletzt 01.09.18 18:19:00

alt Re: Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
Okay, I editied the "random_char_hempguy" script to replace Hempleaves with Bloodleaves. I also changed the random map scripts.

Now I'm wondering if Hemp plants generate in Herbal Gardens. I can't find the script that controls which plants spawn in them.

I also found the scripts that control the quests that involve hemp products, but I'm not sure how to go about editing them.

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
No herbal garden do not spawn hemp...only bitter root, bllodleaf, and the 3 type heal herbs. Since you build the garden with the hammer, look in the object_buildings.inf file.

Where is the scripts for the hemp quest, so i don't have to search for it.

alt Re: Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
It's in mods\Stranded II\maps\adventure\.

map05.s2s and map05_villager.s2s have scripts relating to the exchange.

I can edit the dialogue just fine, but I can't make sense of the scripts.

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
Just to clarify before we proceed. For your mod, are you going to have the Adventure mode available and the mod is of that? Your modifying the Adventure mode only?

Or?

Will your mod have the random maps they can load a Island from the menu of options: Size,Type, Difficulty? Your modifying the random maps?

Or You are modding both?

Note; At the top of the game.inf file you have options to enable or disable the menu choices such as having adventure on or off, or having the Editor on or off, etc. An example is my mod, Adventure is disabled (adventure=0) because I did not mod the adventure. My mod has the random maps exclusively...(i made a new button that says "New Island")...I also left in only the Raptor Game as a choice with random maps. You may want to download my mod and start it up once and see in the menu. There is no Adventure in my mod. You can alternatively make the random maps disabled and only have a modded Adventure, to choose from.

The random maps are randomly generated islands and have nothing as far as an adventure or game sequences to follow. Just the raw environment basically. You control the island generation from those random_endless_inf files. You may want to study those a bit and see how the scripting works interacting with all the scripts in the other files. You then create your mod from scratch entirely...with only the limits of your imagination and scripting ability.

------------
The reason I ask is: The Adventure probably has things you can and can not change due to the "source code" where not many here can alter the source code.

Where as a random map you can simply modify the .inf ID's and delete/create anything you want. If you only mod the random maps you just delete the Hemp ID 134 from those random_endless.inf files and the hemp is non existent. Same with the hempleaf and joint, delete the ID from the bottom of those pages, as that is where anything that spawns on the island, it's general location from the shoreline, and what ratio amount, is generated each new map. Example: If you delete the section under ###Palms### the island will be generated with no palms at all.
4× editiert, zuletzt 02.09.18 07:21:44

alt Re: Creating a mod

SlyCooperReloadCoded
User Off Offline

Zitieren
The mod will affect Adventure mode, but the only thing in Adventure mode that I want changed also affects Random maps - item descriptions and a complete hemp removal.

My end goals:

- Enhance item descriptions to make it feel more hopeless, like you're actually stranded. For example, I changed the description of cookies to "A chocolate chip cookie. Man, I miss Grandma, she always made the best cookies." This gives the feeling that the protagonist feels.

- Completely remove hemp leaves, hemp plants, and joints from the game. They will no longer generate in random maps, and the adventure quests will use other items instead.

alt Re: Creating a mod

JasJack67
Super User Off Offline

Zitieren
ok, the Hemp Plant is ID 134, you should probably simply delete the ID entirely, and then make the BloodLeaf ID 134...now in the source code the Hemp Plant will be processed as the Bloodleaf.

You would have to change the random_endless ID's at the bottom and delete the bloodleaf id and add back the ID 134 so they spawn the bloodleaf using the new ID 134.

Now when the Hippy processes the Quest the ID 134 (was hemp plant) will now be Bloodleaf and the player would have to collect the bloodleaf.

You might want to change this though, cause the bloodleaf is not a plant scripted to "grow" as the Hippy explains how to grow the HEMP...so you should pick a plant that is scripted to grow, like the Berry Bush, or Grapes? The player would then follow the hippy quest and grow berries and bring the berries to the hippy.

NOTE; If you use Berry Bush for example dont forget, the berries now represent the HEMP LEAF so you would DELETE the berries ID and make the Hemp Leaf use the Berries ID. Now the source code processes the hemp leaf ID as the berries ID.

Lastly, you will have to go through the COMBINATIONS inf files and find the combo's for all berry or grape, and all hemp and change those combo ID's to match the changes you made...Example: Berries + Stone makes Berry Juice...if you change the berry ID you have to fix this combo.

So basically you have 6 locations that you have to carefully change and delete ID's:

1) all random_endless.inf files (what spawns and not spawns on random maps)
2) object_bushes.inf (hemp plant and replacement plant)
3) items_stuff.inf & items_edible.inf (hemp leaf item, and replacement item)
4) a few combinations.inf files (replacement items combos ID's)
5) game.inf where the player plants stuff (planting replacement plant/item) in the script on:useground{


When i say delete the ID i mean delete the entire entry including all scripts, so to delete the hemp plant delete all of this:
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
### Hemp
id=134
name=Hemp
group=bush
icon=gfx\hemp.bmp
model=gfx\hemp.b3d
col=2
health=150
autofade=1500
mat=leaf
swayspeed=2
swaypower=1
var=water,Watered,0,0
var=needs,Needs,0,0
var=die,Die,4,0
var=watered,Effects,0,0
growtime=9
script=start
	on:kill {
		$tmp=1;
	    $tmp2=spawntimer("self");
		if($tmp2>-5){$tmp=2;}
		if($tmp2>-1){
		    $tmp=3;
			create "item",49,getx("self"),getz("self"),1;
		}
        create "item",83,getx("self"),getz("self"),$tmp;
	    corona getx("self"),getz("self");
        freevar $tmp,$tmp2;
	}
	on:load{
        if($difficulty>2){
			if($die==3){
				color 255,255,255;
			}elseif($die==2){
				color 150,100,10;
			}elseif($die==1){
				color 0,0,0;
			}
		}else{
		    if($die==4){
			    color 255,255,255;
		    }elseif($die==3){
				color 200,200,200;
			}elseif($die==2){
				color 150,100,10;
			}elseif($die==1){
				color 0,0,0;
			}
		}
	}
	on:plant {
		spawntimer "self",-8;
		$needs=1;
		timer "unit",1,1000,1,"farming";
		local $x,$y,$z,$screen,$get1,$get2;
		$x=getx("unit",1);
		$y=(gety("unit",1)+18);                //same as the camera height/eyes definition
		$z=getz("unit",1);
		$get1=getpitch("unit",1);
		$get2=(($tmp1/18)/18);				//divided by twice the camera height/eyes definition
		$screen=create("object",3782,$x,$z);
		if(($get1 < 1) && ($get1 > -1)){
			setrot "object",$screen,0,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y,$z;
		}elseif($get2>=0){
			setrot "object",$screen,0+$get1,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y-$get2,$z;
		}elseif($get2<=0){
			setrot "object",$screen,0+$get1,getyaw("unit",1),0;
			setpos "object",$screen,$x,$y+$get2,$z;
		}
	}
	on:changeday {
		if($difficulty > 1){
			if($needs==(1)){
                if(getweather()==1){
                    timer "self",1,1,"watered";
				}elseif(count_inrange("object",188,160,"self")>=1){
                    timer "self",1,1,"watered";
                }else{
				    if($water==(0)){
					    $die--;
				    }
                    if($die==3){
					    color 240,180,80;
				    }elseif($die==2){
					    color 150,100,10;
				    }elseif($die==1){
					    color 0,0,0;
				    }elseif($die==0){
					    alterobject "self",4986;
				    }
                }
				$water=0;
				$watered=0;
			}
		}
	    if($season==0){
		    if(count_inrange("object",3578,62,"self")==0){
				free "self";
			}
		}
	}
	on:watered {
		if($watered==0){
			$watered=1;
			$water=1;
			if($difficulty>2){
				$die=3;
			}else{
				$die=4;
			}
			color 255,255,255;
		}
	}
script=end
description=start
I don't think I can get into trouble smoking this stuff out here anyways. Maybe I could sell it in bulk to the pirate. I could use a few whaling spears, or maybe that pistol finally.
description=end

Then pick your new replacement plant and make it's id read id=134 only.

Finally; Don't forget you need to re-trace the WeedGrandpa scripts, in the scripts folder, and change the text dialogue to match your changes. Then go play and test your modifications and make sure you didn't miss anything or create and error. If you delete a ID and you miss fixing something, like a combination that results in making the ID you deleted... the game will crash with an error "missing ID" or "ID already being used".
4× editiert, zuletzt 03.09.18 03:42:36

alt Re: Creating a mod

ModJuicer
Super User Off Offline

Zitieren
Hey guys, hemp is not marijuana, but marijuana is a type of hemp. https://ministryofhemp.com/hemp/not-marijuana/ and it is also very efficient for biofuel, paper making and ropes. By changing a few things you could make the hippie in a quest for paper and ropes & whatnot. Maybe you could even add a combo to turn hemp into rope, and rope into some other things. Also maybe it could be an ingredient in fires, as it burns even better than wood. Just remove the joint and change the discription of the plant (In my opinion a way better choice than bloodleaf, because bloodleaf has no use, and it wouldn't make sense that the natives or hippie would want to trade for it) Hemp, in my opinion, is better than wood(in real life) because it grows faster, burns longer, and makes paper and ropes better. Of course it would take a lot of effort to use hemp for construction, so I'll leaf it at that
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Mods-ÜbersichtStranded II-ÜbersichtForenübersicht