5 Strange Hard-coded TripleA Features Developers Should Know About

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

5 Strange Hard-coded TripleA Features Developers Should Know About

Pulicat
This post was updated on .
In the spirit of Cracked.com, I present:

5 Strange Hard-coded TripleA Features Developers Should Know About (according to my own discoveries):

1) Only one country may receive unit control, but many countries may give. No country may both give and receive.
2) Units folder needs battleship_hit even if battleship is not 2-hit. The engine reads the name "battleship" and requires a battleship_hit. If I rename the unit and its unit art as "battleboat," keeping all things the same, I no longer get an error telling me I am missing a battleboat_hit.
3) Engine determines whether a move phase is combat or non-combat by reading the step name. Step name must contain "CombatMove" or "NonCombatMove." If I rename step to be "germanASDF," I get an error telling me engine cannot determine whether the step is combat or noncom.
4) Movement counters reset after noncom, not endturn.
5) Unlanded planes crash after noncom, and even with v3 carrier production rules on, it doesn't delay the crash till endturn, only makes exceptions to planes that are over water.

--Pulicat

EDIT: As noted by Karl, #2 battleship_hit graphic only needed if "two hit battleship" property is true, regardless of whether the battleship unit is actually two hit or not.
how now brown cow?
Reply | Threaded
Open this post in threaded view
|

Re: 5 Strange Hard-coded TripleA Features Developers Should Know About

Veqryn
Administrator
2) this is actually not true...  I can delete the _hit and the game runs fine
you may be finding this because the 2 hit deal is in both a property and an attachment, and both have to be false to actually turn off bb's two hit

5) you are only talking about planes crashing on land right?  cus in all my tests, planes over water do not crash with the v3 rules, so it is working as intended.



also,..... you only came up with 5?  I can think of a million more to add...


I really need to learn java

(kev, if I learn java, can you walk me through the engine a bit?  did you figure it all out yourself just be reading the source?)
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: 5 Strange Hard-coded TripleA Features Developers Should Know About

Wisconsin
From what I've seen of the detailed and careful work you do, I think you'll be great at Java once you learn it.

And it's actually not too difficult to learn how the engine works, its just that it takes a long time. (At least for me... :D)

I'm still learning parts of it myself, but at least it's a lot like C#.

If you want to learn Java, you can read some of the free online programming books available. Here's a link to one that I found: http://math.hws.edu/javanotes/ 

I hope this helps,
    Wisconsin
Reply | Threaded
Open this post in threaded view
|

Re: 5 Strange Hard-coded TripleA Features Developers Should Know About

Wisconsin
In reply to this post by Veqryn
Oh, and here's a direct link to the actual PDF file, if you want to download it: http://math.hws.edu/eck/cs124/downloads/javanotes5-linked.pdf

I hope it helps,
    Wisconsin
Reply | Threaded
Open this post in threaded view
|

Re: 5 Strange Hard-coded TripleA Features Developers Should Know About

ComradeKev
Administrator
In reply to this post by Pulicat
Pulicat wrote
1) Only one country may receive unit control, but many countries may give. No country may both give and receive.
This is a known issue.  I have plans to rework the whole giver/receiver code to be much more extendable.  The existing code was hacked together to support the Pacific map.

Pulicat wrote
3) Engine determines whether a move phase is combat or non-combat by reading the step name. Step name must contain "CombatMove" or "NonCombatMove." If I rename step to be "germanASDF," I get an error telling me engine cannot determine whether the step is combat or noncom.
4) Movement counters reset after noncom, not endturn.
Interesting.  I'll put it on the list of things to do- but if you'll open a feature request, that'll help me to not forget.

Pulicat wrote
5) Unlanded planes crash after noncom, and even with v3 carrier production rules on, it doesn't delay the crash till endturn, only makes exceptions to planes that are over water.
Also interesting.  Is this causing a particular problem for some mod?  Include it in the feature request above and I'll look at it.

If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: 5 Strange Hard-coded TripleA Features Developers Should Know About

ComradeKev
Administrator
In reply to this post by Veqryn
Veqryn wrote
(kev, if I learn java, can you walk me through the engine a bit?  did you figure it all out yourself just be reading the source?)
I already knew JAVA.  I started learning the engine with bug fixes and writing some code to support Pacific... then just picked it up as I went.  But I'm still figuring some stuff out and periodically ask sgb questions- just yesterday I was stumped on what a particular method was doing and asked for help.

If I have your email addy in my yahoo account, I'll send you a PDF (or maybe excel, I don't remember) I wrote when I was studying for JAVA certification.  It's pretty dry- but a good study guide for picking up the basics.

But to answer your question, yes I'd be happy to give you a tour.
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line