TT1 Forum
Even if you're a guest in tribal trouble, you don't have to be one here! Register now!

TT Modding, learn Java the fun way!

View previous topic View next topic Go down

TT Modding, learn Java the fun way!

Post by EPIC_FAIL on Sat Feb 08, 2014 10:55 pm

Hey guys, as some of you may have seen, Dapianokid has "learned how to change the base code files for the game" and get stuck into the Java of it all. This is exciting stuff for both the possibility of modding TT, but also for how this can be used for us to start learning our way around some of the 'source code'-y sort of files. Fun stuff basically.

I've had a look down there myself, and it's a big chunk of code, but luckily it's not something unmanageable...
____________________________________________________________________________________________________________________________
(excerpt from a PM between Dap and I):

...in fact, this is pretty much the best opportunity we have to learn about our own game's source code if it ever does come to be released to us by Sune.

Regardless of how you feel about modifying the game, if you want to help out with the TT Project here is a great way to get started. What better way to learn the code than tinkering with the code itself? Dap, who had little Java experience, is now breezing through this stuff and is finding all sorts of possibility with the game buried deep down in there. So head on over and grab a Java decompiler (or just download this one: Windows/Linux/Mac), and follow these steps:


Other than that just go crazy kids! If you find ways to do neat new stuff, post about it over in the TT Modding forum, or talk about coding stuffs/Project ideas (new campaign anyone..?) here!

Woohoo! bounce


Last edited by EPIC_FAIL on Thu Feb 20, 2014 5:56 pm; edited 3 times in total

_________________
ABOLISH
avatar
EPIC_FAIL
Failure
Failure

Posts : 135
Reputation : 13
Join date : 2012-03-11
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Sun Feb 09, 2014 5:52 pm

I didn't know much java at all and I'm already writing in java thanks to some motivation from Oddlabs! I'm writing a new campaign if I get good enough. Smile

By the way, my quick tutorial is just a way of making the game have a gamespeed that is 4 times faster than normal. Rebuilding the file is the safest way to make a successful mod, but so far I have been unable to do that. So I've been using a class editor to change the values in the class.

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Tue Feb 11, 2014 11:02 am

dap I want to mod the ai s in singleplayer I did what you told us

but I don't know wher to put the moddifed file I tried to put it in tt main file but it nothing happened
plz help
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Tue Feb 11, 2014 4:34 pm

Well, first, if you succesfully edited/rebuilt a modded .class file, I'm truly impressed and glad to see somebody else is working on this.

Second, if you have the modded file, follow these instructions carefully:

Open up the file I listed at the top of my PM to Epic_Fail (tt-code.jar.SVN-WORK) using WinRAR. Browse it until you get to the folder which holds the file with the same name as the .class file you edited. Drag and drop the modded .class file from the place you have it into the .jar file (which is the main code for the game) into the same directory, MAKING SURE IT REPLACES THE OLD ONE. Now run TT. Test out your modded feature. If you notice a difference, your mod is successful and theoretically stable!

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Tue Feb 11, 2014 5:33 pm

here is the problem when I drag the modded file in to the directory ,  they sed :

! Write error in the file C:\Program Files (x86)\Tribal Trouble\gamedata\data-1\common\.svn\text-base\__rzi_0.489. Probably the disk is full
Access is denied.


Last edited by 007 on Tue Feb 11, 2014 6:08 pm; edited 1 time in total
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Tue Feb 11, 2014 6:07 pm

You need to be Admin of the computer you are using. Log into the owner's account or change your permissions. Or reinstall the game as yourself if that is possible.

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Tue Feb 11, 2014 6:19 pm

I am an admin
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Tue Feb 11, 2014 6:27 pm

The file you're trying to modify doesn't exist in the installation of the game...

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Wed Feb 12, 2014 3:32 pm

i didn't use eclipse or java ide I used notepad to change the values ,
does this work ?
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Wed Feb 12, 2014 4:01 pm

007, yes it does. Never change the name of the files or the methods or the classes. You can change most of the properties files and most of the lines in them (if you ever see someting like () or {0} following a comma, don't mess with it.) but if you see a string of recognizable characters in a file you're viewing with notepad, it's likely very volatile information. In other words, it's almost assuredly crucial and it's also compiled code. Use a hex editor if you want to be safer. Better yet, decompile the code before changing it. The best utility I've found for these purposes is unfortunately written for German users. :/

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Wed Feb 12, 2014 4:19 pm

which file you were going to upload ?
I have problem with WinRAR cuz I drag the file to the directory and I didn't modified it and WinRAR sed :
Write error in the file C:\Program Files (x86)\Tribal Trouble\gamedata\data-1\common\.svn\text-base\__rzi_0.489. Probably the disk is full
Access is denied
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Wed Feb 12, 2014 5:19 pm

Well first defragment your disk!

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Sat Feb 15, 2014 7:52 pm

dap thank you it worked

but I have another problem when I start a game in singleplayer it just crashes in the download part
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Thu Feb 20, 2014 11:29 pm

dap when you will upload the file?
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Dapianokid on Sun Feb 23, 2014 6:49 pm

When I'm actually into it again/when the game almost dies. There's so much gaming going on right now that we're content to keep playing. I don't have time to put a lot of work into it and I don't own a computer which can upload fiels atm.

_________________
This signature is unique.
avatar
Dapianokid
Chicken Warrior

Posts : 537
Reputation : -9
Join date : 2011-05-25
Age : 19
Location : Look! Up in the trees!!

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by 007 on Fri Apr 11, 2014 5:27 am

upload the file
avatar
007
Rock Warrior

Posts : 65
Reputation : -1
Join date : 2012-02-24
Age : 21

Back to top Go down

Re: TT Modding, learn Java the fun way!

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum