elementaldisaster Posted June 2, 2013 Author Share Posted June 2, 2013 Hey!I'm working on a pirate game project, which is based in an archipelago with many islands.I would however like to add some kind of "island description" for each island. Example:In map properties there is a large text box where you can enter this description, along with some basic info about the island. Each island is made using one map. On the sidebar there will be a button which will display the islands info.I think this feature should be fairly easy to create, but honestly I'm not the best with source codes, so if anyone could help point me in the right direction that would be great! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)I hope you understand what I mean, it's not easy to explain ^^Really appreciate all replies and thanks for reading ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Matt Posted June 2, 2013 Share Posted June 2, 2013 Yes. It is fairly easy to do ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png)Go to the map rec, and put there this```Description as string * 100```**Do that for both the server and client.**Now go to the client. Go into the Map Editor, and put there a textbox to write the description in. Double click on the textbox and put there something like this```map.Description = txtDescription.text```Now look for this```Put #f, , Map.MaxY```and put there this underneath it.```Put #f, , Map.Description```Now look for```Get #f, , Map.MaxY```and put there this underneath it.```Get #f, , Map.Description```Now look for```Map.MaxY = Buffer.ReadByte```and put there this underneath it.```Map.Description = Buffer.ReadString```Now look for``` Buffer.WriteByte .MaxY```and put there this under it```Buffer.WriteString .Description```Save, and compile. Now to the server! Look for```Put #f, , Map(mapnum).MaxY```and put there this underneath it.```Put #f, , Map(mapnum).Description```Now look for```Get #f, , Map(i).MaxY```and put there this underneath it.```Get #f, , Map(i).Description```Look for```Map(mapnum).MaxY = Buffer.ReadByte```and put there```Map(mapnum).Description = Buffer.WriteString```Look for```Buffer.WriteByte Map(mapnum).MaxY```and put there```Buffer.WriteString Map(mapnum).Description```Save, and compile! Now you need to delete your maps, or make a converter to avoid losing your maps. Let me know if you run into any problems! Link to comment Share on other sites More sharing options...
elementaldisaster Posted June 2, 2013 Author Share Posted June 2, 2013 Where will the description be displayed if i use that? I would like to make it display just like inventory etc. upon clicking a button… Link to comment Share on other sites More sharing options...
Matt Posted June 2, 2013 Share Posted June 2, 2013 Ah. I forgot to add that bit. How would you like it to be displayed? Will it be a simple playermessage, or do you want a page of sorts to show up with the description? Link to comment Share on other sites More sharing options...
elementaldisaster Posted June 2, 2013 Author Share Posted June 2, 2013 A page, just like inventory for example, with the description text inside.Thanks by the way, really helpful ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
Matt Posted June 2, 2013 Share Posted June 2, 2013 Take a look at how the inventory tab is handled. It's rather simple ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
elementaldisaster Posted June 2, 2013 Author Share Posted June 2, 2013 ~~compiled server:map.Description = _**txtDescription**_.textTxtdescription got marked~~edit: firgured it out, thanks for the help, gonna try sort out the display now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Matt Posted June 2, 2013 Share Posted June 2, 2013 > firgured it out, thanks for the help, gonna try sort out the display now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)No problem! Let me know if you have any issues ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
tehl33tjim Posted July 4, 2013 Share Posted July 4, 2013 This could be an interesting addition to my game. I wouldn't want to use it as descriptions, but maybe for small random bits of info. Like the known minerals in the area, or something. Hmmm…this definitely has potential. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now