kavaline

Mod Dual Characters controlled by 2 players in different commands

Recommended Posts

kavaline    13

Hi, I want help to create a character project that works in this way; when enters the game, spawns 2 characters, that one responds to some commands (W, A, S, D, LCtrl, F, Space, and defaults), and other, to another commands (customizable buttons, such Arrows and Numbers, that can bind a controller with 3rd party softwares). The objective is to play with 2 characters in same PC, same screen, same application.

Some details/mechanics:

> The screen decreases the zoom when players get far to another, up to a limit X, and reaching the limit, cant go further. [I have no idea of how to do it, if any mod does this, please, tell me. Some mods deals with zoom, so, I think that is possible to do it]

> To craft, the character can press a button to identify who will craft, putting him in a "craft mode"; using mouse/keybindings/navigation to craft, will craft for the character in craft mode. Doing the same command will get off the craft mode. If other player do the command, will remove the first player of the craft mode (the last player in craft mode will craft). [If someone know how I can bind who is the crafter, tell me]

> If possible, the characters will not share prototyped recipes (if one craft a Boards, the other don't unlock this recipe).

> Every character have their Attributes (150 Health, 150 Hunger, 200 Sanity), inventory slots, equip slots. Sanity auras will affect only the character in the range (monsters, evil flowers, etc). The inventory and attributes HUDs can be hided/showed with a command. [separated attributes is easy, but the HUDs looks really hard]

> The characters will share the craft HUD, minimap and map. [Except for the crafter, looks that here dont have problem...]

> If one dies, will decrease sanity of the other like normal ghost, and can be ressurected by the other character, [I think that here need do nothing]

For now, I dont want give any special powers; the main challenge will do the template character itself, so, attribute values, combat modifier, sanity drain/regen, custom crafts, and any custom personal hability isn't important at moment (and 2 players playing together with their own attributes alread is a special power, and cant go too far to another, alread is a drawback). Also, I'm not thinking about compatibility with other mods, because for me, with my knowledge, this mod is nearly impossible to do, and thinking in codes to work with others mods, is really impossible.

If someone have any question about a mechanic or some possible problem, post here, and I will update the details/mechanics to solve the incompatibility.

And who wants help me (and please, do it! Just do it!), just tell me a mod that do something like that I want to do, pieces or suggestion of codes, etc. Or PM me to help in programming. I have no idea of how I can start this character (after get the template).

And, if you think: "Why you want this?"

I want do this because I'm introducing my girlfriend to play games, and she don't have a computer. Don't Starve is a good and fun game to play together in coop mode. Also, she isn't used to play games, or computer, so in this way I can help she, keeping a close distance in game and out game. I think that others players will enjoy this mod too, playing in same PC with other person to learn to play, or just for fun.

(Klei/Experienced Modders, would be great if another player could control Abigail, Maxwell Shadows, Bernie, follower Pigs/Catcoons/Spiders/etc, Critters, Pets, etc, or a new character idea :D)

Edited by kavaline

Share this post


Link to post
Share on other sites
Ultroman    537

Then, what you want is not this game. I'm not entirely sure that this cannot be achieved, or at least some of it, but first of all, you'll run into keyboard restrictions about how many and which buttons you can hold down at the same time, even on modern computers. This isn't just impossible for you to do. It's most likely impossible to do within the engine. The players' computer is bound to a single client, so everything has to run on that one client. Your GF's character can never become totally autonomous, because you'd fully share the UI. You'd have to build all new UI elements from scratch, to react to this extra entity. Crafting tabs, status badges, inventory, you name it.

There are plenty of other awesome games which are played in local co-op. My two favorites, which are also GF-worthy, are "Pixeljunk Shooter" and "Lovers in a Dangerous Spacetime". Is there not an option to get her a second-hand computer that can run Don't Starve Together? It doesn't require much processing power for a client.

Edited by Ultroman

Share this post


Link to post
Share on other sites
kavaline    13
4 hours ago, Ultroman said:

Then, what you want is not this game. I'm not entirely sure that this cannot be achieved, or at least some of it, but first of all, you'll run into keyboard restrictions about how many and which buttons you can hold down at the same time, even on modern computers. This isn't just impossible for you to do. It's most likely impossible to do within the engine. The players' computer is bound to a single client, so everything has to run on that one client. Your GF's character can never become totally autonomous, because you'd fully share the UI. You'd have to build all new UI elements from scratch, to react to this extra entity. Crafting tabs, status badges, inventory, you name it.

There are plenty of other awesome games which are played in local co-op. My two favorites, which are also GF-worthy, are "Pixeljunk Shooter" and "Lovers in a Dangerous Spacetime". Is there not an option to get her a second-hand computer that can run Don't Starve Together? It doesn't require much processing power for a client.

Thanks for the comment, but I will try. I will not give up without put the hands on.

Also, I dont want a 100% autonomous 2nd player, this is insane to try. I want do what is possible, some UI elements is possible to do, but is quite hard. I saw mods with custom attribute badges, and increased inventory, so isn't impossible to do. I need learn how attach to different characters. The craft tab will be shared, dont have reason for not. The challenge will design for not respond to wrong character, and not respond to some keyboard inputs. Of course, the players will need be close, because the opened UI will take the screen, but I figure it as a drawback of the mod character, need play in some harmony. And about the keyboard inputs, is possible to configure a joystick to do it, and is quite easy (I played lots of 4 players games in same PC in this way with my friends). The mouse, can use an android wifi mouse, I use to watch media from my bed.

And, about impossible things, tell me: is possible to create a mod that change Dont Starve into a fight game like Smash Bros?

Lots of people maybe told him that is totally impossible, and told him to play other games :)

Share this post


Link to post
Share on other sites
Ultroman    537

I wish you the best of luck doing this! You'll need to do a lot of custom coding, though. I just think it might be more fun to spend all that development time playing video games with your GF instead :)

Share this post


Link to post
Share on other sites
kavaline    13

@Ultroman

Ty. Because of the study and work, we only pass the weekend together, so, during the week, I program :D

You know other possible problems/incompatibility that can occour due to this mod?

@Desblat

Ouch, ty so much! You alread did what I'm trying to do, this will be very usefull. I will read your mod soon, I'm stucking in this days trying spawn more than one character. I did another mod with a custom character, mobs and pet, and using him to spawn together, and later, attach player commands step by step.

I'm trying something with:

local function OnSpawn(inst, pet)
	local p2 = SpawnPrefab("skeleton")
	local pt = inst:GetPosition()
	p2.Transform:SetPosition(pt.x, 0, pt.z)
end

 

  • Like 1

Share this post


Link to post
Share on other sites
Desblat    329
10 minutes ago, kavaline said:

@Ultroman

Ty. Because of the study and work, we only pass the weekend together, so, during the week, I program :D

You know other possible problems/incompatibility that can occour due to this mod?

@Desblat

Ouch, ty so much! You alread did what I'm trying to do, this will be very usefull. I will read your mod soon, I'm stucking in this days trying spawn more than one character. I did another mod with a custom character, mobs and pet, and using him to spawn together, and later, attach player commands step by step.

I'm trying something with:


local function OnSpawn(inst, pet)
	local p2 = SpawnPrefab("skeleton")
	local pt = inst:GetPosition()
	p2.Transform:SetPosition(pt.x, 0, pt.z)
end

 

Look up mod called "sisters re-united" it's about wendy and ressurected abigail. I am sure you can find useful code there. I think there was an option that allows full contol using arrow-keys etc of alife abigail.

  • Like 1

Share this post


Link to post
Share on other sites
kavaline    13

Yes, the interface codes will be very usefull. I know how use SG and brains )for NPC, enemies, and custom actions), and your mod will help me to attach buttons for the other character. My nightmare will be the inventory interface, badges, and an option to show/hide. Luckly lots of players attributes have a component that can emulate this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now