Home | Tutorial Home | Sourceforge Home | Downloads | Contributions |
Download a module After download the engine, you will need a game module. In the "downloads" section you will see the available games to download. If you want to create a new game, so download a 'BLANK' or 'TEMPLATE' module. Download a game module, and extract it in the modules folder. If you are using a 1.09 version or later, you can use the .zip file without extracting it. All the content of the game must be in one folder! Otherwise, if you dont want to download a module, you can create one, but I dont recommend it. TOP Default module folders The game module must have at least the default folders: data: Have the game data images: Have the game images sounds: Have the game sounds saves: Have the game saves The data folder must have the default folders: actors: Have the game actors, with at least one actor lang: Have the game language files with at least the english language maps: Have the game maps files, with at least one map monsters: Have the game monsters items: Have the game items scripts: Have the game scripts And must have the settings files, see 'Configuration' section. The images folder must have the default folders: background: Have the game backgrounds for main menu and battles buttons: Have the game buttons images characters: Have the game actors images, must have the null.png. icons: Have the game icons tiles: Have the game tiles, must have the null.png and default tiles. The BLANK game module have the default images and tiles, all images must be in PNG format Default images: The tile "warehouse_floor.png" is useful to store any items out of the player inventory. The tile "ranch_area.png" is useful to place the items that need water, like vegetables. The tile "animal_area.png" is useful to place the items that need food, like cows and chickens. The tiles "armor_eq.png", "boots_eq.png", "gloves_eq.png", "weapon_eq.png", "helmet_eq.png", "shield_eq.png", "eq6.png", "eq7.png" and "eq8.png" is used in the equipments window. And the player images in player folder : "hero_n.png", "hero_s.png", "hero_e.png", "hero_w.png" The sounds folder must have the default sounds: day.ogg: Song of the day day_song.ogg: Song of a new day night.ogg: Song of night rain.ogg: Song of rain tornado.ogg: Song of a tornado main_menu.ogg: Main menu song If the game dont use timed effects, these files may not exist in the sound folder, or are silent sound files. The BLANK game module have the default sounds, all sounds must be in OGG format TOP Module settings files The module folder data have various files to configure the game, please see the 'Configuration' section. TOP My first RPG Here a simple tutorial to create your game If you have downloaded a 'BLANK' or 'TEMPLATE' game module, ignore the step 1. STEP 1 First create a folder in the modules folder of the engine, with the name you want. Now create in that folder the default folders and files of a game module. STEP 2 See the 'Map editor' section. Create a map in the Map Editor with the name you want. Now open the game settings menu, click on the 'start location' button and click in the location in the map, the player will start here! Open the game settings menu, click on the 'save settings' button. Press the 'F6' button and click somewhere in the map, press 'return' or 'enter', write the script action info("I found the treasure !") and click 'yes' Click in the line below or press the down button, press 'return' or 'enter', write the script action give("gold", 1579) and click 'yes' Click in the button with a circle and save your map in the 'file' menu or pressing 's'. Exit the map editor and test your game. TOP Actors The actors in the game, playable or not. To create a actor, create a text file in the actors folder with the name of the actor, and write the attributes. Below all actors attributes:
TOP Items The items of the game. Each item is a text file in items folder, with the name of it. Items have various atributes, and types. Animals and Vegetals are items too. Here the list of item types: 0 : Equipment weapon 1 : Equipment armor 2 : Equipment shield 3 : Equipment helmet 4 : Equipment gloves 5 : Equipment boots 6 : Script equipment 7 : Script equipment 8 : Script equipment 10 : Unusable item 11 : Healing item 12 : Explosive item 14 : Gems 15 : Scripted usable in battle 16 : Scripted usable out of battle 17 : Scripted usable in and out of battle Any types above can have the attributes that transform the item in a animal, vegetal, or a timed item. Equipments The items to modify the player attributes like attack, defense, element and weak. Equipment example:
#Name of item Name=Rusty Knife #Type of item, 0 is weapon type=0 #Quality of the item, power of the item ( the item is a weapon, then will increase 1 attack point) quality=1 #Price is the cost to buy an item price=5 #Value is the selling price. If price and value are 0, you cannot sell or drop the item. value=2 #Element of the item, will change the element of the player. The player and item default is "noelement" element=metal #Weak of the item, will change the weak of the player. The player and item default is "noweak" weak=water #Description of the item description=A rather useless knife #Tile picture of the item picture=equipments/rusty_knife.png #The actor required to use this item, if "player", then it is the main actor, if "no", then it is all actors restrictuse=player #Some script actions to do when the player attack a monster with this weapon. Work with weapons only. :scripting info("The player have used the rusty knife") Unusable The items that the player cant use. Like keys. Generally used for Animals and Vegetals too. Example of a unusable item:
Name=Key type=10 #Quality of the item (useless in this type) quality=0 price=0 description=A small, rusty key. picture=items/key.png Healing The items to restore player's hp. Example of a healing item:
Name=Healing potion type=11 #Quality of the item ( this item will restore this amount of hp) quality=25 price=10 description=Healing energy radiates out from the container. picture=items/healing_potion.png Scripted This item type is able to do anything, using the TP-1 engine script actions. Example of a scripted item:
Name=Ale #Usable in and out of battle type=17 quality=1 price=2 value=2 #The \ symbol is used to continue in a new line description=What is a bar without something to drink? This substance is \ apparently ale, but it doesn't look quite right. #If the item is of type 15-17, place scripting between :scripting and :values. :scripting #TP-1 action to add hp to the player give("hp", 5) #TP-1 action to remove energy from the player give("ep", -2) #TP-1 action to print a message info("You feel slightly better, but a bit dizzy.") #If you end the file in scripting mode, there is no need for the ending :values :values #The file must be relative to the images/tiles directory. picture=foods/drink.png Vegetables, animals and timed items To make a vegetable, animal or a timed item, first add the need attributes in a item file. The need attribute of the item: need=water ; Without water, this item will die. And after time, the item will grow or morph need=water_nomorph ; Without water, this item will die. And after time, the item will give another item need=food ; Without food, this item will die. And after time, the item will grow or morph need=food_nomorph ; Without food, this item will die. And after time, the item will give another item need=time ; After time, the item will grow or morph need=time_nomorph ; And after time, the item will give another item A example of a vegetable:
Name=Brocolis Plant type=10 quality=5 price=15 value=15 description=Brocolis plant, not ready to eat yet. picture=vegetables/brocolis_plant.png #Amount of days to the item change time=3 #Amount of days to another item change time2=5 #Resistance of the item, a amount of days that item resist without water (what is in the need attribute) resistance=3 #The new item that will replace this item, after the time value timechangeitem=Brocolis #The new item that will replace this item, after the time value timechangeitem2=Brocolis Seeds #What this item need to survive need=water #Months dont supported by this item, in this month, the item resistance will down faster autumm=no winter=no #Status of the item, used by the engine. If you write died, the item will die when dropped in the map. status=ok Example of a animal:
Name=Cow type=10 quality=25 price=375 value=300 description=A adult cow, it give milk. resistance=6 time=2 time2=45 need=food_nomorph timechangeitem=Cow Milk timechangeitem2=Cow Little status=ok picture=animals/cow.png Example of a baby animal:
Name=Hatching Chicken Egg type=10 quality=12 price=18 value=12 description=A chicken egg that will hatch soon. resistance=2 time=5 #This item dont need water and food by the player, but need to be in the correct place. need=baby timechangeitem=Chick status=ok picture=animals/chicken_egg.png The timed items supports any place of the map, and dont need anything, only time. Example of timed item:
Name=Silvester Cherry type=17 quality=15 price=45 value=40 description=Cherry, silvester sweet fruit. resistance=1 autumm=no summer=no spring=no #A new Silvester Cherry will be added every 12 days. time=12 need=time_nomorph status=ok :scripting give("ep", 7) give("hp", 9) :values picture=vegetables/cherry.png TOP Monsters A list of monsters attributes are below, in the same way to you put in your new monster file. The string after the = symbol is the value of the attribute before the = symbol. Its very easy.
#Name of the monster Name=Phantom #Health points of the monster hp=20 #Max Health points of the monster maxhp=20 #Energy points of the monster ep=20 #Power of the monster attack=4 #Defense of the monster defense=4 #Experience points to give to player after defeating this monster exp=4 #Money to give to player after defeating this monster gold=4 #Item to give to player after defeating this monster reward=ale #Description of the monster description=This actor is testing the game, he is angry and want to fight. Defeat him and receive one ale. #Weak of this monster, like metal, fier, head-shot, or another. Default is "noweak" weak=metal #Element of the monster, if the player weak is the same thing of the monster element, the monster attack will be more powerful. Default is "noelement" element=fire #Default status of the monster, if not configured, is normal. status=nice #TP-1 script actions to do before the monster attack. To dont attack after scripting, write the action end(). :scripting info("The Phantom is furious") TOP Maps The map is a area with various tiles, to the player walk amd interact. It have a lot of resources, like actions, onload actions, background tiles, transparent tiles, over tiles, definitions settings... To start making new maps, learn about TP-1 Scripting first, and after it you can use the map editor, or create manually. Map time or weather transitions The TP-1 engine make a automatic map transition by the status of the day. Example, if its night, then the night version of the map will be loaded. To do it, the map must have the correct structure and the timed effects must be active. The structure is a tile to load only in the correct time, example: pix("grass.png") if(daystatus(), "==", "night") pix("night_grass.png") endif See the map editor section to learn more about maps, and Scripting to see the map scripting actions. Map Example TOP Languages Language files The language files are in the lang folder in the data directory, and it is useful to translate the engine and the game module. If you write "__" two underlines, the tradutor.py will change to a space. Example of a language file : name=english Name of the language n_of_lines=3 Number of tradution lines in this file 1=First line of english language file Tradution line 1 2=Second line of english language file Tradution line 2 3=Third line of english language file Tradution line 3 ... The tradution lines 1 to 300 is reserved to the engine translation, and the tradution lines above 300 is for the game module. TOP Scripts In the folder 'scripts' you can create or put additional scripts to your game, it is optional, but useful. To create a script file, read the 'Scripting' section. TOP |