Developing Tuxemons Campaign - Part I

Avatar

By josepharaoh99 10 Dec 2015 15:43

Champion · 295 comments

Hey, guys! I thought I'd share some of my ideas and problems I'm having creating the campaign for the first stage of Tuxemon. Any time along the way, feel free to give me any ideas of how to make things better or to modify the maps I might put up. Also, I have decided to somewhat follow this plot.https://github.com/Tuxemon/Tuxemon/wiki … plot-idea)
   So, I'm having a problem getting a chain of dialog going. Here's a sample of the events I have created.

act1: create_npc Maple,3,4,maple,stand
act2: set_variable maple_bedroom1:true
cond1: not variable_set maple_bedroom1:true
act1: dialog Hey, ${{name}}! Guess what?
act2: set_variable maple_bedroom2:true
cond1: is variable_set maple_bedroom1:true
cond2: is player_at  
cond3: not variable_set maple_bedroom2:true
act1: dialog I know you can't afford your own Tuxemon.
act2: set_variable maple_bedroom3:true
cond1: is variable_set maple_bedroom2:true
cond2: is button_pressed K_RETURN
cond3: not variable_set maple_bedroom3:true
act1: dialog I know where you can get one!!
act2: set_variable maple_bedroom4:true
cond1: is variable_set maple_bedroom3:true
cond2: is button_pressed K_RETURN
cond3: not variable_set maple_bedroom4:true

So, what's wrong here? Can anyone give me a template for how to do this?


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 11 Dec 2015 19:40

Lead Developer · 374 comments

Hey josepharaoh,

Thanks for posting this. I previously successfully tested chaining two dialogs together using set_variable, but never tried more than that. After some testing, it seems that we'll need to do a little backend work to get this to work right with more than 2 dialogs. It shouldn't take too much work to implement, so I should be able to get those changes done soon. Here's what I did for two chained dialogs with the current system:

act1:     dialog Hey there stranger!
act2:     set_variable bedroom1:true
cond1:    is player_at
cond2:    is player_facing up
cond3:    not variable_set bedroom1:true
cond4:    is button_pressed K_RETURN
act1:     dialog My name is lampy. Lord of all lamps.
cond1:    is variable_set bedroom1:true

UULT55C.gif

I'm thinking of creating a dialog_chain event or simply reworking the existing dialog action to make it easier to do this. Ideally, I'd like to shoot for something like this:

New Proposed Way

act1:     dialog_chain Hey there stranger!
act2:     dialog_chain My name is lampy. Lord of all lamps.
act3:     dialog_chain Go forth and inact my lampy will.
cond1:    is player_at
cond2:    is player_facing up
cond3:    is button_pressed K_RETURN

Avatar

By josepharaoh99 13 Dec 2015 19:18

Champion · 295 comments

So how would you do 3 dialogs in a row?


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 14 Dec 2015 06:13

Lead Developer · 374 comments
josepharaoh99 wrote

So how would you do 3 dialogs in a row?

It previously wasn't actually possible to do more than 2 dialogs because of a bug in the dialog system. To fix this, I created a new dialog_chain action that you can use for multiple dialogs in the latest commit to the development branch. You'll need to pull the latest changes to use this new action. Right now the current dialog system is pretty rough, so let me know if you have any more problems with it.

Here's how you can use it:

act1     dialog_chain Hello stranger!
act2     dialog_chain My name is Lampy, lord of all lamps.
act3     dialog_chain Go forth and inact my lampy will.
act4     dialog_chain ${{end}}
cond1    is player_facing_tile
cond2    is button_pressed K_RETURN

Avatar

By josepharaoh99 14 Dec 2015 16:22

Champion · 295 comments

Thanks! Will check it out!


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By josepharaoh99 29 Dec 2015 16:48

Champion · 295 comments

Okay, I'm kind of confused. I've seen a lot of suggestions for maps and the story line, but I'm not sure what even needs to be made right now. I have made some basic campaign maps and will probably soon make a pull request, but I need to know what to make after that. So, can someone draw a clear road map for the story of Tuxemon, telling exactly what maps needs to be made, and things done?
   I really like some of the ideas that everyone has been coming up with.  smile


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 30 Dec 2015 06:33

Lead Developer · 374 comments
josepharaoh99 wrote

Okay, I'm kind of confused. I've seen a lot of suggestions for maps and the story line, but I'm not sure what even needs to be made right now. I have made some basic campaign maps and will probably soon make a pull request, but I need to know what to make after that. So, can someone draw a clear road map for the story of Tuxemon, telling exactly what maps needs to be made, and things done?
   I really like some of the ideas that everyone has been coming up with.  smile

At this point in time there is no clear road map for the story yet. The overarching story has been established, but the specifics are still very much up for discussion. Feel free to post your ideas or open pull requests on how you'd like to see the story progress. At this time we can rework any part of the official campaign to conform to a more compelling and cohesive story.


Avatar

By Sanglorian 30 Dec 2015 09:53

Champion · 491 comments
josepharaoh99 wrote

Okay, I'm kind of confused. I've seen a lot of suggestions for maps and the story line, but I'm not sure what even needs to be made right now. I have made some basic campaign maps and will probably soon make a pull request, but I need to know what to make after that. So, can someone draw a clear road map for the story of Tuxemon, telling exactly what maps needs to be made, and things done?
   I really like some of the ideas that everyone has been coming up with.  smile

I've been thinking about this myself - and here's my proposal for a way forward: https://forum.tuxemon.org/viewtopic.php?pid=492#p492

What do you think?

Avatar

By josepharaoh99 30 Dec 2015 15:54

Champion · 295 comments

I REALLY like this for the most part, Sanglorian! You have made this clear and easy to do. I will began working on maps, and be sure to keep working on concepts. I appreciate all that's been done. Also, to make a walking Tuxemon, someone will need to make a Tuxemon npc. I could do that, but I don't think it would look any good unless someone supplied some side and back pictures of Tuxemon.
   But, to perfect these maps, I will need a few new functions:
1. remove_npc (from map)
2. remove_tuxemon (or trade_tuxemon)
3. change_map_tile (to remove a tux ball from the map when you pick it up)
Thanks guys, I really like your ideas! smile
P.S. I think I like the original idea to find Tuxballs in a junkyard, which is probably what I will do.

Last edited by josepharaoh99 (30 Dec 2015 16:02)


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 31 Dec 2015 19:29

Lead Developer · 374 comments
josepharaoh99 wrote

I REALLY like this for the most part, Sanglorian! You have made this clear and easy to do. I will began working on maps, and be sure to keep working on concepts. I appreciate all that's been done. Also, to make a walking Tuxemon, someone will need to make a Tuxemon npc. I could do that, but I don't think it would look any good unless someone supplied some side and back pictures of Tuxemon.
   But, to perfect these maps, I will need a few new functions:
1. remove_npc (from map)
2. remove_tuxemon (or trade_tuxemon)
3. change_map_tile (to remove a tux ball from the map when you pick it up)
Thanks guys, I really like your ideas! smile
P.S. I think I like the original idea to find Tuxballs in a junkyard, which is probably what I will do.

Thanks for these new function suggestions! I'll try and work on implementing some of these actions to aid in your map designs. You're right that we would need creature walking animations if we want them to appear as NPC's on the world map.

For the change_map_tile action, I'm thinking I'll create a add_world_sprite and remove_world_sprite function for items that you can pick up from the world.


Avatar

By josepharaoh99 13 Jan 2016 21:38

Champion · 295 comments

Since I am having trouble figuring out Github, I am giving a download link for some of my files I have made, including map files. Check 'em out! https://www.dropbox.com/sh/2th1vp2u6ykn … iZuUa?dl=0


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 17 Jan 2016 10:56

Lead Developer · 374 comments

These are a great start, thanks for working on these! Hosting them via dropbox is also fine. I can always download them and then commit them to git myself.

When I was testing the maps, I ran into a few problems:

maple_bedroom.tmx
error: Couldn't open ./tuxemon/resources/sprites/boss_front.png

I didn't have the "boss" sprites, so I got this error when trying to enter rooms with NPCs that were trying to use these sprites. Do you have a copy of these sprites?

map1_apartment3.tmx
create_npc Trent,3,7,player,stand

Since this has no conditions, it will continuously create new NPCs, which destroys performance over time as thousands of new NPCs are generated. You should have a condition here that prevents the NPC from being created over and over again. I usually do this with not npc_exists <NPC Name> or something similar.


Avatar

By josepharaoh99 23 Jan 2016 19:47

Champion · 295 comments

Sorry! I gave the wrong link. This is the link to sprites and maps: https://www.dropbox.com/home/Tuxemon%20addon

Last edited by josepharaoh99 (25 Jan 2016 22:52)


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By josepharaoh99 29 Jan 2016 22:57

Champion · 295 comments

Okay, I have laid out the very basics for the story line in your home town in the game. But, the events aren't all working right, so I would appreciate it if someone would help me with them. Again, here's the link: https://www.dropbox.com/home/Tuxemon%20addon\
Thanks!


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 30 Jan 2016 05:25

Lead Developer · 374 comments
josepharaoh99 wrote

Okay, I have laid out the very basics for the story line in your home town in the game. But, the events aren't all working right, so I would appreciate it if someone would help me with them. Again, here's the link: https://www.dropbox.com/home/Tuxemon%20addon\
Thanks!

That dropbox link is not publicly accessible sad


Avatar

By josepharaoh99 1 Feb 2016 22:35

Champion · 295 comments

Okay, this should work. Here's a shared link: https://www.dropbox.com/sh/mmxw6w238qjh … RgsFa?dl=0 It's letting me access it when signed out, so it should anyone else, too.

Last edited by josepharaoh99 (1 Feb 2016 22:35)


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By ShadowApex 12 Feb 2016 02:33

Lead Developer · 374 comments

Thanks for posting the public link. I finally got around to testing some of the maps you've made. I can't tell you how much I appreciate you working on new maps. By running into these problems, it really helps define what we're missing and what we can improve. If you give me the exact problems you're having I can help further, but here's some things that I found that I provided solutions for:

My testing mostly centered around the maple_bedroom.tmx map that you provided. With what you wanted to accomplish, I actually added the following new actions and conditions to the latest development branch of Tuxemon:

New Conditions

New Actions

With these new conditions (and a bug fix for pathfinding), I was able to get the series of events working correctly on the map file here:
https://gist.github.com/ShadowApex/2af974c39027f9068a7d

v1E7v1I.gif

There are still a few bugs, but for the most part all of the events on that map should work. Try reviewing the events in Tiled to see what I did. (Remember that you'll need the latest version of Tuxemon from the development branch for the new events to work)

Again, if you give me other specific issues, I can try and look into them.

Thanks!


Avatar

By dulsi 25 Jul 2016 11:21

Member · 27 comments
ShadowApex wrote

For the change_map_tile action, I'm thinking I'll create a add_world_sprite and remove_world_sprite function for items that you can pick up from the world.

I was looking at how the map works. add_world_sprite is difficult unless you put the image in separate file. If it is in the tile set image there is no text name for particular items. I'm wondering if add_world_sprite is needed. For the case of placing a capture device on the ground, you probably only need remove_world_sprite. Add the capture device at layer 3 and just remove it when it is picked up. If you want a burnt out crater for a rocket blast off, draw the crater on layer 2 and draw green ground over it on layer 3. When the rocket blasts off remove the layer3 images. If you need more layers than what is currently available, it might be easier to change the "Above player" to not simply be layer 4. Instead make it be layer 4 or the first layer named "Above player". (Granted if you want something above player that changes like plants changing, that can't be implemented this way.)

Avatar

By bitcraft 25 Jul 2016 15:37

Champion · 166 comments

I'd like to keep a distinction between "sprites" and the map.  For placing things on the ground, ideally, the game engine would accept an item slug, then build a new sprite for the map.  We could implement pushing of items, maybe some basic physics to animate bouncing, etc, all of which isn't possible by placing tiles on the map (by changing map tiles).

Avatar

By dulsi 26 Jul 2016 08:38

Member · 27 comments

I agree. In most cases making an item an entity like an NPC instead of modifying the map would be better. I'm not sure I would say that is always the case but unless josepharaoh99 has another use case he needs it for, I'm willing to push that off.

Avatar

By josepharaoh99 26 Jul 2016 18:49

Champion · 295 comments

I think making a sprite like an NPC is a good idea. I think we should probably create separate files for sprites like balls, berries, and other pickups, and then make an event to add/remove them like an NPC. To change them, all you would have to do is remove them and add a new one in their place. That's what I envision.


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By bitcraft 26 Jul 2016 19:42

Champion · 166 comments

I don't see a need for separate files for the items.  We already have json db entries for these things.  We could possibly reuse the existing art or make "map sprites" for each for display during map gameplay.  And we would need to plan out some event actions for manipulating them.  Overall, I don't think it would be a huge problem to add sprite/item/entity features.

I've opened a github issue for adding/removing items on the game map.

https://github.com/Tuxemon/Tuxemon/issues/193

Last edited by bitcraft (26 Jul 2016 20:07)

Avatar

By josepharaoh99 27 Jul 2016 18:24

Champion · 295 comments

All right, whatever works. I don't know anything, so I'll just follow your lead big_smile


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By josepharaoh99 30 Jul 2016 02:04

Champion · 295 comments

Wow, I've been working on maps for the Tuxemon story line as outlined by Sanglorian, and they are turning out so cool! But I'm having a few bugs...I'll probably share the maps soon to see if anyone can help me iron the wrinkles. big_smile They are so cool!


Multiple Media Producer
Jesus is God! http://www.upci.org/search

Avatar

By josepharaoh99 31 Jul 2016 01:40

Champion · 295 comments

Here is a link of the maps I need help with: https://www.dropbox.com/sh/mmxw6w238qjh … RgsFa?dl=0 If they don't open, let me know. Give me some input! Thanks!


Multiple Media Producer
Jesus is God! http://www.upci.org/search