Source Code Access

Gedan

BUTTS BUTTS BUTTS
Staff member
Aug 26, 2015
8,008,907
8,008,325
This time the source code update was delayed like an entire day and this is the most appropriate place to post it.

Because I had to rebuild the tasks on the buildserver for reasons and haven't set up the part that handles the automatic push to the public github origin. I've had far more important things to fix up, namely, handling a bunch of issues with the CoC2 build process.
 

SeriousBlueJewel

Well-Known Member
Nov 5, 2018
1,677
867
Because I had to rebuild the tasks on the buildserver for reasons and haven't set up the part that handles the automatic push to the public github origin. I've had far more important things to fix up, namely, handling a bunch of issues with the CoC2 build process.
Perfectly reasonable
 

SynthRider

New Member
Jun 18, 2019
1
0
27
Hi, I'm looking to re download an old swf of TiTs. To be specific 0.7.231, would there be a way all old versions are available to download on github?
Or if anyone still holds that copy and send it my way?
Thank you for readin ^-^ <3
 

Savin

Master Analmander
Staff member
Aug 26, 2015
6,232
10,152
Hi, I'm looking to re download an old swf of TiTs. To be specific 0.7.231, would there be a way all old versions are available to download on github?
Or if anyone still holds that copy and send it my way?
Thank you for readin ^-^ <3

There's a whole thread dedicated to begging for that build. Post there.
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
Hi, I'm looking to re download an old swf of TiTs. To be specific 0.7.231, would there be a way all old versions are available to download on github?
Or if anyone still holds that copy and send it my way?
Thank you for readin ^-^ <3
You can build it from sources on github…
Code:
git clone <URL>
cd <repo directory>
git checkout c01fce892006ed007360c8017232837b346b4744
…then build.
I just looked it up, and while the commit message didn't mention it, that is the commit that it got bumped to 0.7.231 in.
…Or do what savin said. Probably simpler.
Speaking of sources, could we please have those for this latest public build? Seems that's still not automatically getting pushed so I just wanted to draw attention to it's absence.
Happy 'Murica Day.
 
Last edited:

Dorkulon

Well-Known Member
Sep 10, 2015
89
25
Welp, code got pushed... but it's all on branch "public" instead of "master". Not sure if this should get mentioned in the bugs thread, and/or if this is the branch we should be using in the future.
 
  • Like
Reactions: Hanzo and Droxzyn

SeriousBlueJewel

Well-Known Member
Nov 5, 2018
1,677
867
Welp, code got pushed... but it's all on branch "public" instead of "master". Not sure if this should get mentioned in the bugs thread, and/or if this is the branch we should be using in the future.
Without your help I would probably taken way to long to figure that out, so thank you.
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
Hey, it's been a couple days so I'd like to ask about sources again.
I'm trying to work on improving a java-based TiTS save editor ( https://github.com/Chase-san/JTiTsEd ), and even if it's still mostly doable with old code it bothers me to not be closer to up-to-date.

Additionally, last month's source drop didn't directly correspond to the imagepack build ( spam filter detected my github issue link as spam, so I'll just say it's issue #220 ), so it's actually closer to two months old now. Essentially there were no provisions for a couple of in-line images from the pack that could be seen as lines of code in the decompiled game that could not be seen in the sources provided.

Before anyone advises me using the decompiled game, the TiTS.as class has tons of includes in it that are merged together in the decompiled game. Takes a TON of RAM to decompile and is much harder to navigate through than the normal source tree.
 
Last edited:

LoriJ

Well-Known Member
Jan 10, 2020
47
12
You can build it from sources on github…
Would you be able to provide me with some assistance as to how to actually build it.
I have looked into it but so far I haven't succeeded.
It'd be great if I got it working so I can test bugs/bugfixes locally.
 

Dorkulon

Well-Known Member
Sep 10, 2015
89
25
Would you be able to provide me with some assistance as to how to actually build it.
I have looked into it but so far I haven't succeeded.
It'd be great if I got it working so I can test bugs/bugfixes locally.
The "easiest" way is probably to install FlashDevelop, have it install flex etc, grab fl.swc from one of the projects that redistributes it, comment out the "import fl.motion.Color" directives, and then build. Once FlashDevelop generates the .xml file from the as3proj file, you can manually invoke mxmlc.jar yourself (e.g.
mxmlc -load-config+='obj\TiTSFDConfig.xml' -incremental=true -swf-version=22 -o 'obj\TiTSFD.swf') instead of having to fart around with FlashDevelop all the time.
 

LoriJ

Well-Known Member
Jan 10, 2020
47
12
The "easiest" way is probably to install FlashDevelop, have it install flex etc, grab fl.swc from one of the projects that redistributes it, comment out the "import fl.motion.Color" directives, and then build. Once FlashDevelop generates the .xml file from the as3proj file, you can manually invoke mxmlc.jar yourself (e.g.
mxmlc -load-config+='obj\TiTSFDConfig.xml' -incremental=true -swf-version=22 -o 'obj\TiTSFD.swf') instead of having to fart around with FlashDevelop all the time.

Thank you for your reply, however I need some clarification.
Are you talking about commenting out the "import fl.motion.Color" from the source files located in classes/UIComponents or am I misunderstanding something here.
 

Dorkulon

Well-Known Member
Sep 10, 2015
89
25
Thank you for your reply, however I need some clarification.
Are you talking about commenting out the "import fl.motion.Color" from the source files located in classes/UIComponents or am I misunderstanding something here.
Yeah, like 5 of classes/UIComponents/ButtonTray.as or thereabouts; I think there might be a mention in the save editor, too.
 

LoriJ

Well-Known Member
Jan 10, 2020
47
12
Yeah, like 5 of classes/UIComponents/ButtonTray.as or thereabouts; I think there might be a mention in the save editor, too.

The only other one that is not uncommented showed up with a search in classes/UIComponents/SideBarComponents/StatBar.as
Anyway at the moment I'm failing to build at all with "Error: Java heap space" which might be an issue with the installation FlashDevelop, so I'm not getting anywhere yet..
 

gena138

Well-Known Member
Feb 2, 2017
238
178
  • Like
Reactions: LoriJ

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
Would you be able to provide me with some assistance as to how to actually build it.
I have looked into it but so far I haven't succeeded.
It'd be great if I got it working so I can test bugs/bugfixes locally.
I would, but I'm not a Windows user and I had to hack together a different and rather convoluted build system for it due to both carelessness (wrong casing in some file names, which is hard to fix later on in Git if you have people using it under Windows) and general difficulties figuring out how to invoke the flex compiler directly. If you're still interested let me know.
I had the 32-bit JRE installed since FlashDevelop asks for it when installing, but appearantly the 64-bit version will allow it to compile succesfully.
Ah, good. Never mind then. Yeah, building it (especially the image pack) takes loads of RAM these days.
 
Last edited:

LoriJ

Well-Known Member
Jan 10, 2020
47
12
I would, but I'm not a Windows user and I had to hack together a different and rather convoluted build system for it due to both carelessness (wrong casing in some file names, which is hard to fix later on in Git if you have people using it under Windows) and general difficulties figuring out how to invoke the flex compiler directly. If you're still interested let me know.

Ah, good. Never mind then. Yeah, building it (especially the image pack) takes loads of RAM these days.

I usually develop using Linux too, so I have ran in to some of them as well, I think I noticed an issues on github from you mentioning it.
Currently I'm using Wine to run stuff... Though I think the biggest problem was the RAM, but after way to much troubleshouting already I haven't found the energy to try and setup the build without it..
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
I usually develop using Linux too, so I have ran in to some of them as well, I think I noticed an issues on github from you mentioning it.
Currently I'm using Wine to run stuff... Though I think the biggest problem was the RAM, but after way to much troubleshouting already I haven't found the energy to try and setup the build without it..
Is it working for you now? If not I can give some pointers. Of course, they'll be a month or so out of date because they forgot to push the code for the public build again this month.
It is possible to compile it without wine, but you likely need wine to make mobile AIR builds.

To compile an SWF without wine, you need Flex. I use the last Adobe Flex version primarily because I vaguely remember having some strange issue with Apache's Flex. This was years ago, but "if it isn't broken, don't fix it" has stopped me from trying to use Apache Flex again. I took the lazy approach and just let FlashDevelop download it in wine, but you don't need to use wine/FD for this step.

You basically need to create an XML file that describes some basic properties of the SWF you're trying to build. There's an example from Adobe someone linked here. You can 'cheat' by using FlashDevelop to build the game once and checking the CLI args it passes to 'mxmlc.jar' when it invokes it (mxmlc is the flex xml compiler thing). It will include a path to a temporary XML file that FlashDevelop generated.
You can just copy that file from its temporary location and modify it for your own purposes (i.e., changing the paths to unix style paths).

Then you can invoke mxmlc from native java using something like (borrowed from the command line that flashdevelop was using, and edited for unix/linux shells, using more RAM (I used 6GB because image packs take a ton of RAM to make, but you can probably get away with a lot less otherwise), and splitting into multiple lines of text):
Code:
java -Xmx6072M -Dsun.io.useCanonCaches=false \
-Duser.language=en \
-Duser.region=US \
-Djava.util.Arrays.useLegacyMergeSort=true \
-jar "/path/to/flexairsdk/whatever/lib/mxmlc.jar" \
+flexlib="/path/to/flexairsdk/whatever/frameworks" \
-load-config+=yourbuildconfig.xml \
-debug=true \
-swf-version=22 \
-o "bin/TiTS.swf"
/path/to/flexairsdk is whatever path flashdevelop in wine had saved your SDK's to. You can move it around, you won't likely ever need to use flashdevelop again barring major changes to the build system (this has worked for about six years now for me).

Of course, you'll still need to fix about a bazillion filenames that use the wrong casing (upper vs. lower-case) in the source code, or symlink the files to their incorrectly-named versions that the code looks for, or you'll get errors while building.

Also, if anyone who can do it is listening, would you please consider pushing the latest public source code to the github?
 
Last edited:

LoriJ

Well-Known Member
Jan 10, 2020
47
12
Is it working for you now? If not I can give some pointers.

I had it working by building using FlashDevelop run on wine, not yet with native java. Thanks for your pointers though, as I seems to be working natively now!

Of course, you'll still need to fix about a bazillion filenames that use the wrong casing (upper vs. lower-case) in the source code, or symlink the files to their incorrectly-named versions that the code looks for, or you'll get errors while building.

Actually I've only updated two things: I changed a reference to "assets/images/npcs/shou_puppy/warlion.png" to use the actual filename "warLion.png" and a reference to "includes/zhengShiStation/forgehound.as" to use "forgeHound.as".

I've listed some addtional information, maybe someone else might be interested too.

You basically need to create an XML file that describes some basic properties of the SWF you're trying to build.

I actually copied the TiTSFDConfig.xml and updated the paths from windows paths to linux paths and used a symlink to circumvent the "Program Files (x86)" folder (at least I think that one was the problem).
 
Last edited:

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
I had it working by building using FlashDevelop run on wine, not yet with native java. Thanks for your pointers though, as I seems to be working natively now!
Glad to hear it. Good job.

Actually I've only updated two things: I changed a reference to "assets/images/npcs/shou_puppy/warlion.png" to use the actual filename "warLion.png" and a reference to "includes/zhengShiStation/forgehound.as" to use "forgeHound.as".
Ah, yeah. I forgot those were the only problems with the non-imagepack versions. If you try to build an image pack (CONFIG::IMAGEPACK in the .xml file), you'll encounter a lot more errors related to file name casing.[/quote]
I actually copied the TiTSFDConfig.xml and updated the paths from windows paths to linux paths and used a symlink to circumvent the "Program Files (x86)" folder (at least I think that one was the problem).
Yep, that's one of the issues, but primarily because it uses drive letters and backslashes instead of forward slashes. Spaces and stuff in path names are fine so long as the paths actually exist. Symlinking is a relatively good solution.

--
Going to ask again if anyone can bump the public source code version.
 

LoriJ

Well-Known Member
Jan 10, 2020
47
12
Yep, that's one of the issues, but primarily because it uses drive letters and backslashes instead of forward slashes. Spaces and stuff in path names are fine so long as the paths actually exist. Symlinking is a relatively good solution.

So I actually went back to it and figured out what the issue was, it turns out I used '\' to escape the spaces and stuff in the XML file (like you would on the command line), which just messes it up instead..

Concluding, no symlink needed, it was just me that was the actual issue. :p
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
So I actually went back to it and figured out what the issue was, it turns out I used '\' to escape the spaces and stuff in the XML file (like you would on the command line), which just messes it up instead..

Concluding, no symlink needed, it was just me that was the actual issue. :p
Good.
So it's building fine for you without wine now by running the 'mxmlc' program directly?

If you want, I have a build system I've been working on to hopefully simplify things for Linux users. PM me if you'd like to try it. It's basically a bunch of scripts to automate configuring builds and making them for different targets.

I try to keep it up to date with whatever the latest source drop is (still waiting on the latest).
 
Last edited:

LoriJ

Well-Known Member
Jan 10, 2020
47
12
Good.
So it's building fine for you without wine now by running the 'mxmlc' program?
It's working great (it feels way faster too, though I might just be imagining that), your snippet with the code for the java command gave me the information I was missing with my previous tries!
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
It's working great (it feels way faster too, though I might just be imagining that), your snippet with the code for the java command gave me the information I was missing with my previous tries!
Glad to help.
I found that command by looking in either "process explorer" while building in windows or "ps" while building in wine (can't remember which I was using at the moment).

It likely is faster, for a number of reasons, including possibly the startup time of wine apps and the unavailability of `fork()` in Windows apps. The second thing is pure conjecture of course.
 

SlamAzz

Active Member
Dec 24, 2017
37
56
With the new update, it would be REALLY nice if we were to get a public source code update.

As cheap and dumb as it sounds, I legitimately can't play TiTS without the save editor. And the save editor can't be updated unless the source code is. I don't want this to be the end of this wonderful game for me...
 

dragontamer8740

Well-Known Member
Nov 9, 2015
53
55
I hate to beat a dead horse because at this point I'm pretty sure it's just not gonna happen, but it's now been about 1/3 of a year since we had a source drop. Just throwing it out there in the hope someone decides to help us out and rectify that since there could be a public build in the next couple days.

Barring that, if there's some reason (other than not finding the time or not noticing/caring enough) why it has been four months since last push, I'd be interested to hear the reason(s) behind the decision not to update it. Obviously I'm not actually in a position to feel entitled to anything as some random person on the internet, but it'd still be a good gesture that I would appreciate.