Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - H-Hour

Pages: 1 2 [3] 4 5
User modifications / Available Mods
« on: June 25, 2012, 11:06:39 am »
Neo's Tweeks
Changes to graphics, weaponry and aircraft stats, a new research tree, and new research items.
Compatibility: 2.5-dev

Easy Radar Rangefinder
Reduces build times for radar facilities so that players can quickly experiment with radar distribution.
Compatibility: 2.5-dev

Weapon Mod
Three new weapons including the Webb .455 Revolver, Plasma Thrower and Advanced Laser Rifle.
Compatibility: 2.5-dev

Trauma mod
Trauma kit.
Compatibility: 2.5-dev

Bugs in stable version (2.5) / 2.5 campaign undergoing changes
« on: June 23, 2012, 11:55:06 am »
We're implementing some pretty broad changes to the campaign sequence for 2.5, which will eventually see changes to the timing of when you will see nearly all aliens, ufos and weapons. It will also involve some changes to the research tree.

You can see a sketch of the whole picture we're working towards here.

Some of these changes might lead to unbalanced or unstable gameplay in your 2.5 save. This thread will update you about any anticipated problems.

Newbie Coding / MOVED: How 2 add new Items
« on: June 21, 2012, 06:14:37 pm »

A lot of things in UFO:AI can be easily scripted using simple text files. This topic will tell you where to make changes for different parameters. Only post in this thread to request where to find a parameter you want to change. All other posts will be removed.

What are script files and how do I change them?
UFO:AI's script files can be found in the /base/ufos/ folder under your installation directory. This is where the game's executable and data is stored.

If you don't have a /base/ufos/ folder, you probably have several .pk3 files in /base/. You will need to unpack 0ufos.pk3 to view and modify the UFO files.

Note: On Windows systems, save games and other data is often stored in a different directory, also under a /base/ folder. This is not the directory you want to look in.

How can I change a weapon's damage, accuracy, etc.?
You will find all of the weapons stored in /base/ufos/weapon_*.ufo files. Our wiki contains descriptions of weapon script parameters.

How can I reduce/increase the frequency of UFOs?
You will find a campaign scripting parameter called uforeductionrate in /base/ufos/campaign.ufo. Our wiki contains further details on how this parameter is used.

Note: This feature is only available in version 2.5 and above. It was added to 2.5's development version on 17 June 2012.

How can I reduce/increase the speed of research?
Research is controlled in two places. If you would like to adjust the research time required for a single item, you should look at /base/ufos/research.ufo, find the appropriate research item and change the time) parameter. Our wiki contains further details on research definitions.

If you would like to speed up or slow down all research, you should look at /base/ufos/campaign.ufo and change the researchrate parameter. Our wiki contains further details on how this parameter is used.

Note: The research speed parameter in campaign.ufo is only available in version 2.5 and above. It was added to 2.5's development version on 17 June 2012.

How can I make my new recruits have better stats?
You will find character templates stored in /base/ufos/team_templates.ufo. Our wiki contains further details on how to set their stats.

How can I change the price and stats of my aircraft?
You will find aircraft defined in /base/ufos/aircraftmanagement.ufo. Our wiki contains further details on how to set their price and stats.

How can I change the cost of my base buildings and installations?
You will find base buildings and external installations defined in /base/ufos/basemanagement.ufo. Our wiki contains further details on how to change the costs.

How can I change the layout of my first base?
The base template is defined in /base/ufos/basemanagement.ufo. Our wiki contains further details on base building parameters.

How can I make a certain map stop appearing in my campaign?
The maps are defined in /base/ufos/maps.ufo. To prevent a map from appearing in the campaign, add a campaign parameter set to false. Our wiki contains further details on map parameters.

Warning: Map usage in the campaign is determined based on a set of culture, terrain and population parameters for every spot on the globe. If you remove the only map available in that combination, you are likely to get the backup ufo_crash map which already appears frequently in the campaign.

How can I change the frequency that alien weapons appear?
The percentage chance that weapons will appear in a mission are defined in /base/ufos/equipment_missions.ufo.

Tactics / MOVED: Orkish Approach
« on: May 28, 2012, 07:31:26 pm »

Newbie Coding / UI problems with alien containment init
« on: January 26, 2012, 03:31:26 pm »
I am trying to build the alien containment functions in my custom UI and having a problem. I have not put alien containment into its own window node. Instead, it is a panel that I show/hide in the overall bases window (/ui/bases.ufo).

When the panel is opened, I call a confunc which calls aliencont_init, which points to cp_aliencont_callbacks.c, AC_Init_f(), which then calls AC_UpdateMenu(). This function then sets a number of cvars like mn_ac_name0, mn_ac_name1, etc.

In my confunc, after I have called this aliencont_init to get these cvars, I then use them to add children panels for each alien through a while loop. I have found, however, that the while loop is executed before the cvars are populated. It is tricky to spot because each the data is set to the cvars, so when the cvars are populated it appears fine. But I'm trying to limit the number of panels based on a cvar, so I will end up with the correct number of panels for the last time I opened alien containment. That means, if I open alien containment in a base with 3 alien types, then switch to a base with 1, I will get two extra panels with no information. If I open alien containment in a base with 0 alien types, then switch to a base with three, there will be no panels.

Here is my confunc, and I've attached the whole mod to look at. This confunc is in bases.ufo.

Code: [Select]
* Show and hide the alien containment panel
* param1 = true (show alien containment), false (hide alien containment)
confunc alien_containment

if (param1 eq "true") {

// Call to cp_aliencont_callbacks.c to get data
cmd "aliencont_init;"

cmd "echo 1-al0 name <cvar:mn_ac_name0>;"

// Show the alien containment area
*node:parent.base_container.alien_containment@invis = false

// Show the aliens
*cvar:i = 0;
while ( *cvar:i < 8 ) {
if (*cvar:mn_ac_name<cvar:i> ne "None") {
call *node:parent.base_container.alien_containment.aliens@createChild("<cvar:i>", "AlienPanel")
*node:parent.base_container.alien_containment.aliens.<cvar:i>.label@string = *cvar:mn_ac_name<cvar:i>
*node:parent.base_container.alien_containment.aliens.<cvar:i>.status@string = *cvar:mn_ac_statusstr<cvar:i>
*node:parent.base_container.alien_containment.aliens.<cvar:i>.data_bar@current = *cvar:mn_ac_progress<cvar:i>
*node:parent.base_container.alien_containment.aliens.<cvar:i>.alien_num@string = <cvar:i>
*cvar:i = ( *cvar:i + 1 )

// Set the state for subsequent clicks
*node:parent.sections.containment.state@string = false

cmd "echo 2-al0 name <cvar:mn_ac_name0>;"
} else {

// Remove alien panels and hide the image/info when loaded
call *node:parent.base_container.alien_containment.aliens@removeAllChild
* = true

// Hide the alien containment area
*node:parent.base_container.alien_containment@invis = true

// Set the state for subsequent clicks
*node:parent.sections.containment.state@string = true

// Show or hide the base map, employees and buttons under the map
*node:parent.base_container.base_map_container@invis = <1>
*node:parent.base_container.cur_employees@invis = <1>
*node:parent.base_container.buttons@invis = <1>

Discussion / Looking for late-game saves
« on: January 04, 2012, 09:46:28 am »
Are you a player who has beaten the game or come pretty close to the end using the 2.4 development version? If so, would you be willing to attach your save game to this thread? I would like to check out a few things: soldier development, UFO numbers, timelines, etc., and I could use several games to look at.

Coding / Adding a node on top of the dragButton area in UI window
« on: December 24, 2011, 03:56:03 pm »
A window node has the ability to set closebutton and dragbutton, which automatically places nodes for closing and dragging the window.

I would like to keep the dragbutton option but use my own custom node for closebutton. However, because the dragbutton is added after the UI script is read, it "covers up" my closebutton, so I can't place my own clickable node over the drag area.

Is there any way to add a node on top of another node that is added automatically? Or, alternatively, is there a way I can create a a custom node that will have the drag functionality?

The attached image shows the default closebutton. If I remove the closebutton from the window and then add a node in roughly the same place with the same functionality, it doesn't work because the dragbutton area covers it up.

Coding / Adding property to UI node spinner
« on: December 24, 2011, 11:12:45 am »
I'm trying to add a width/height property to the spinner node. Currently they are fixed in the spinner code. (I know that I will also probably need to add a size property, but I'm trying one step at a time.)

So I've added the definition in ui_node_spinner.h and ui_node_spinner.c. And I added a width/height property to a spinner node in my custom UI .ufo file. But when I try to run it I get the following error:

Code: [Select]
------- input initialization -------
0 possible joysticks
no joystick found.
Allocate 2 megabytes for the ui hunkUI_InitializeNodeBehaviour: property 'width' from node behaviour 'spinner' overwrite another property
FS_RemoveFile: remove C:\Users\NateW\AppData\Roaming\UFOAI/2.4-dev/uidev/keys.cfg
There are still 1 opened files


You can see a diff with my changes here. I've also attached it to this post.

I'm not much of a coder so I probably went about it the wrong way... advice welcome.

User modifications / Custom UI
« on: December 13, 2011, 10:35:36 pm »
This has now been merged as a mod into 2.5-dev. Because the UI system is also being reworked, it will no longer be compatible with older versions. You can follow the progress here.

Offtopic / Flash-based Xcom-like game
« on: December 05, 2011, 10:51:06 pm »
Looks like the beta is closed now. Would be interesting to see what they are doing.


Tactics / Weapons/Armor research
« on: October 20, 2011, 11:35:16 am »
I'm looking for some feedback from campaign players on what they research, what they don't bother researching and why. If you could, please let me know your typical research path in the following format:

Preferred research order:
Laser weapons -> Needler -> etc.

Don't research:
Plasma pistol because...
Armor x because...

I'm not interested in every research element, just the general progression through weapons/armor. Thanks.

Mapping / Looking for tips on reducing polys
« on: August 07, 2011, 04:45:11 pm »
For those that know the engine well (I'm thinking mattn and sandro_sleepy, maybe arisian if he's still around). Can you take a look at the following images and give me tips on how to reduce the unnecessary splitting of my geometry?

In particular, if there is some way to reduce the massive splitting that is occuring on my crates, which consist of a single brush marked as detail, but the brush is slightly rotated off grid. Of course, on grid would probably produce fewer polys, but I need them off grid to create that slightly messy look that makes it look "real".

Discussion / Help out if you compile with the latest repository
« on: July 29, 2011, 07:37:48 pm »
Hi everyone,

As I push forward with the new alien base map I'm beginning to worry about performance issues with the high brush count. If you get the latest modifications from GIT, can you help me out by loading up the new alien base map? To do so in skirmish mode, just download the attached file and put it into /base/ufos/. Then the map alienb2 will be available (remove the file afterwards to keep a clean repository).

Once you've loaded the map, open the console and type r_speeds 1. You'll see two numbers: brush and alias. Then zoom out and raise the levels to show more or less brushes and let me know when you start noticing slower performance, and then again when the performance slows down so much that it becomes difficult to play.

If you have performance problems, please do the same thing after disabling real-time lighting and shaders.

Please report your numbers like this:

My machine begins to slow down around 6,000 brushes
My machine gets so slow it's difficult to play around 10,000 brushes
Without real-time lighting and shaders my machine never slows down when all brushes are visible (20,658).


Pages: 1 2 [3] 4 5