*

Account

Welcome, Guest. Please login or register.
Did you miss your activation email?
September 21, 2024, 09:33:02 pm

Login with username, password and session length

Resources

Recent posts

[September 06, 2024, 11:58:09 am]

[September 05, 2024, 01:54:13 pm]

[July 16, 2024, 11:30:34 pm]

[June 22, 2024, 06:49:40 am]

[March 08, 2024, 12:13:38 am]

[March 08, 2024, 12:12:54 am]

[March 08, 2024, 12:09:37 am]

[December 30, 2023, 08:00:58 pm]

[February 04, 2023, 11:46:41 am]

[December 25, 2022, 11:36:26 am]
Pages: [1]   Go Down
  Print  
Author Topic: Just curious bout doctrines...  (Read 1359 times)
0 Members and 1 Guest are viewing this topic.
Freek Offline
EIR Veteran
Posts: 218


« on: June 19, 2009, 12:32:44 pm »

I'm just wondering what exactly goes into implementing a doctrine, eg what do you have to type to allow rifles zooks (heavy weapons).

I'd be interested in seeing all the SCAR code (or whatever) for that.
Logged
Scyn Offline
EIR Veteran
Posts: 1011


« Reply #1 on: June 19, 2009, 01:15:57 pm »

First you make an upgrade in RGD format. eg: 'item_bazooka' which contains a list of things that upgrades normally require. In this case Our action for this upgrade would be to add an item. So we'd add to our actions, a slot_item\add. Now the slot item action must be linked to a particular weapon. This case the Bazooka.

weapon\allies\ballistic_weapon\infantry_anti_tank_weapon\m1_bazooka_atw.lua

A simple upgrade like this has no requirements as we're not modifying the weapon or unit. etc etc just adding an item. So our upgrade is done.

Afterwards we have to add the upgrade to the .luaconsts which is where the scar takes place. I can't really go into very much detail. but here's the jist of it. Obviously these won't fit in here correctly, but normally all these are on separate lines. This is what the code will look like.

BAZOOKA_SINGLE    = BP_GetUpgradeBlueprint("upgrade/_europeinruins/us/items/item_bazooka.lua"),

So here's our Upgrade we just made correctly linked to the RGD. Basically the program wants to know where to pull the information from and that's how we do it, through scar.

And this is how your battalion looks for every unit. Obviously not this exact way of course. Everytime you click something in the launcher it automatically fills in these slots with the information you asked it to process.
{
sgroup = makeSGroup("SGroup108"),
transport = 0,
bp = EIRSBP.US.RIFLEMEN,               
exp = 0,
popcap = 5,
upgrades = {EIRUPG.US.BAZOOKA_SINGLE}
},

There's actually a lot more steps that go into making a doctrine ability, but that's the basics for a simple weapon upgrade.
Logged

God is a genetically induced obsession that we interpret in such a way as to maintain our obedience.
Pages: [1]   Go Up
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!
Page created in 0.049 seconds with 35 queries.