Author Topic: JAC  (Read 5502 times)

0 Members and 3 Guests are viewing this topic.

Offline Ford_Prefect

Re: JAC
« Reply #15 on: January 08, 2015, 09:42:20 PM »
I thought I share a recent development on JAC.  I've come up with (and implemented) a new system for modders to change gameplay.  And its really good.

The original system I was working on, was basically similar to what SMAC did, except with allot more variables that modders could change.  You would tell it "I want this unit's speed to be X" or "I want this to produce x energy per turn", etc, etc.

Now, it is much, much, much, much more flexable.  Now for every variable, you can use a formula.   :D  >, =, <, ADD, MULTIPLY, OR, AND, NOT, are all possible.  So now you can do crazy stuff like "If the unit is on dirt and the player has the tech "Dirtpower" then let firepower = 9000, else let firepower = 100".

The xml will likely look something like this:
Code: [Select]
<firepower>
<OnTerrain>
<Terrain>Dirt</Terrain>
 <True>
   <Hastech>
     <Tech>DirtSupremacy</Tech>
     <True>9000</Tech>
     <False>100</False>
   </hastech>
 </True>
 <False> 100 </False>
</firepower>

This new system solves several problems at once.   :D 
  • It gives near scripting level of flexibility.  Without having to worry about the safety concerns when embedding a language.
  • It will be easy to add new inputs later on for modders to use, without breaking compatibility with old mods.
  • This system is easier to program and test than the old system.
  • Should be much faster than the old system, and I can probably optimize it to go faster (cache the results).

200kb
« Last Edit: January 11, 2015, 02:47:29 AM by Ford_Prefect »

Offline Yitzi

Re: JAC
« Reply #16 on: January 09, 2015, 12:29:47 PM »
I think this is a good move.

Offline Flux

Re: JAC
« Reply #17 on: January 10, 2015, 11:55:53 PM »
Looking forward to this.
Also, I know nothing about Java scripting. But if this was completed, would it allow people to make custom units? :luv:
Left the internet, more-or-less.... Might drop in occasionally.

Offline Yitzi

Re: JAC
« Reply #18 on: January 11, 2015, 12:32:26 AM »
Looking forward to this.
Also, I know nothing about Java scripting. But if this was completed, would it allow people to make custom units? :luv:

Custom units are easy.  The tricky part is custom abilities and chasses with custom rules...and this method would very easily allow such things.

Offline Ford_Prefect

Re: JAC
« Reply #19 on: January 11, 2015, 01:58:05 AM »
It allows you to really customize the units.  Also, its written in Java not javascript.  But don't worry!  Unless you want to work on the engine or AI, all you will need to know is XML.


218kb

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Fossils fuels in the last century reached their extreme prices because of their inherent utility: they pack a great deal of potential energy into an extremely efficient package. If we can but sidestep the 100-million-year production process, we can corner this market once again.
~CEO Nwabudike Morgan, Strategy Session

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]