UFO:Alien Invasion

Development => Newbie Coding => Topic started by: MCR on April 23, 2010, 09:57:42 am

Title: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 09:57:42 am
First I have to admit publicly here that I do not yet understand the syntax of the ufo files  ::), after reading those, I am not even 100% sure if there is a syntax to be used there...

1.)
I need some help  :-\.
I would need links where I can find the syntax of the ufo scripts or documentation on how exactly those scripts work...
Please do not give me this link: http://ufoai.ninex.info/wiki/index.php/UFO-Scripts#Scriptfiles
as I cannot find anything there...  :-[ :P ???

2.)
Maybe someone knowing stuff already could take a look @ that:
https://sourceforge.net/tracker/index.php?func=detail&aid=2991126&group_id=157793&atid=805245#

Take a look here also:
http://ufoai.ninex.info/forum/index.php?topic=4713.msg37203#msg37203

I want to see those great textures in-game  ;)!
Thank you in advance.

Title: Re: Help needed with ufo scripts...
Post by: Kildor on April 23, 2010, 10:38:01 am
All information about .ufos is in wiki or comments in that files.
Ask precise questions if you have ones.


And that textures are in game. Just play a bit, and you will fight with ortnoks in medium armour. That`s all.
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 10:59:50 am
see team.ufo (http://ufoai.ninex.info/wiki/index.php/UFO-Scripts/team_*.ufo)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 11:42:39 am
@Kildor: Question: Why is Taman armor defined in armour.ufo (http://ufoai.svn.sourceforge.net/viewvc/ufoai/ufoai/trunk/base/ufos/armour.ufo?view=log), but Ortnok armor is not ?
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 11:54:58 am
Why is medium armor for tamans not defined here, when light armor is (team_aliens.ufo (http://ufoai.svn.sourceforge.net/viewvc/ufoai/ufoai/trunk/base/ufos/team_aliens.ufo?view=log)) ?

   models {
      neutral {
         aliens/taman body01 head01 0
         aliens/taman body01 head01 1
      }

Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 11:57:38 am
what the heck are you talking about? in armour.ufo is light and medium armour for aliens defined. they should not appear in team_*.ufo (and are not in your paste).
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:00:41 pm
It is only defined for the TAMAN, but not for the ORTNOK ?!?

How can this directories in team_aliens.ufo ever work for the Ortnok when the imagepath for them is NOT defined in armour.ufo ?
   models {
      neutral {
         aliens/ortnok body01 head01 0
         aliens/ortnok body01 head02 0
         aliens/ortnok body01 head03 0
         aliens/ortnok body01 head01 1
         aliens/ortnok body01 head02 1
         aliens/ortnok body01 head03 1
         aliens/ortnok body01 head01 2
         aliens/ortnok body01 head02 2
         aliens/ortnok body01 head03 2
      }
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 12:02:25 pm
which image path are you now talking about? there is no image path. and there is everything right for the ortnok (except i'm not seeing something, which might of course be the case)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:04:31 pm
Quote armour.ufo:

//weights 100
item armour_light_alien
{
   name      "_Alien Body Armour"
   image      armour/taman_light

//weights 120
item armour_medium_alien
{
   name      "_Medium Alien Armour"
   image      armour/taman_medium
   type      armour

But NO PATH to Ortnokarmor...
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:08:01 pm
But maybe I am completely wrong here, I do not know  :-[ :-\, but I am sure there is something 'fishy' there, like Duke would say...
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 12:11:00 pm
ah, you posted team_*.ufo content but were refering to armour.ufo content - that's what had confused me.


that doesn't matter - as the image would be only used for displaying it in the menu. We don't have armour per race yet, only per team. But that does not have any impact on the values from team_*.ufo
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:17:33 pm
It is just that Tamans are spawned (only in light armor), but ortnoks are not spawned in any armor when playing skirmish for example...
But when changing the definition to:
   models {
      neutral {
         aliens/ortnok body01 head01 0
         aliens/ortnok body01 head02 0
         aliens/ortnok body01 head03 0
         aliens/ortnoklight body01 head01 1
         aliens/ortnokmedium body01 head01 2
      }
You will suddenly see different kinds of (high-resolution, good looking) Ortnoks on the battlefield in Skirmish Mode...
Also the definition for Taman Medium Armor in team_aliens.ufo is missing:

aliens/taman body01 head01 2

I hope that helps you to understand, sometimes I feel like speaking Chinese language here  ;)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:25:05 pm
Mattn, thanks for the link.
There I found this:
Quote:
The model file name is the name for the unarmoured model. If the actor was equipped with an armour, the path is extended with the values from the particular armour definitions

Quote end.
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 12:26:22 pm
again, there should be NO armour references in team_*.ufo - they are only added  if the actor has any armour equipped
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 12:34:03 pm
extended the wiki article a little bit on this topic.
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:39:22 pm
again, there should be NO armour references in team_*.ufo - they are only added  if the actor has any armour equipped

                                 
^This means for me that Ortnoks NEVER get their armor equipped, how should the engine ever know where to find those textures without armourpath definition in armour.ufo !?

Sorry I still do not fully understand (will read the update in a minute).
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 12:41:58 pm
there IS an armourpath definition in armours.ufo for both alien armous, light and medium, one is set to "light" and one is set to "medium"
Title: Re: Help needed with ufo scripts...
Post by: Kildor on April 23, 2010, 12:47:15 pm
This is not skirmish but campaign.

Read equipment_missions.ufo please. Aliens in your game just don`t have enough interest to have armour.
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:50:59 pm
Okay. Then this means Ortnokarmor image (the rendered one (armor.jpg)) will never be displayed in-game.

& still the definition for Taman Medium Armor in team_aliens.ufo is missing:

aliens/taman body01 head01 2

But I do understand now that armors for aliens are not separated for the races (lamp !)...
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 12:59:27 pm
@Kildor: Thanks for all the info, I will read it & try to understand  ;)
Title: Re: Help needed with ufo scripts...
Post by: Mattn on April 23, 2010, 01:21:33 pm
& still the definition for Taman Medium Armor in team_aliens.ufo is missing:

it's really the last time: There is NO reference to armours in team_*.ufo - so nothing is missing there.
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 02:48:32 pm
I am quite sure that those models do not depend on alien interest !?
Why are those not enabled in-game ?
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 02:52:22 pm
Especially the black princess is nice  ;)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 02:53:40 pm
I would like to have her in my team...  :-\
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 03:20:20 pm
 :-[
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 23, 2010, 10:56:53 pm
Sorry again for turning your head  :-[, but I am learning fast & what I understood once I will know in the future...
The problem was that...

1.) The naming scheme for heads & bodies is a little confusing...

2.) I thought the references were pointing to the textures, not to the md2 files, my fault, my error, sorry 'bout that again...  :-[

3.) It was very confusing to read only the reference to the taman armor.jpg in the reference for alien armor, so I initially automatically thought that the whole definition is for Tamans only & not valid for all of the aliens, so in my opinion this should not be this way & there should be special armor definitions for the other races also...

4.) There is still a problem in team_aliens.ufo, I am sure about that, but I have to find out what it is exactly & will then prepare a patch to correct it...

Thanx for putting the 'new' phalanx-soldiers in, I like the black beauty most ;)

I wonder how they 'fell out' of the game...
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 24, 2010, 11:24:25 am
Now that I understand this stuff here (lamp!), I will prepare a patch to enhance readability in team_aliens.ufo...


Here what I found out:
Code: [Select]
aliens/ortnok body01 head03 2 // Body:Scared Legs Head:One-eyed Ortnok

The '2' means that body01.md2 should take the skin number 2 (body01c.jpg), which is the Ortnok body with scared legs & use head03.jpg (one-eyed) for the head... (doublelamp!)

...

I would suggest this version for the Ortnok for example:
Code: [Select]
models {
neutral {
aliens/ortnok body01 head01 0 // No Armor, Body: Big open wound, Head: 2 small scars over the left eye
aliens/ortnok body01 head02 1 // No Armor, Body: Big scar, Head: Big scar over the right eye
aliens/ortnok body01 head03 2 // No Armor, Body: Scared legs, Head: One-eyed Ortnok
aliens/ortnok body01 head01 1 // No Armor, Body: Big scar, Head: 2 small scars over the left eye
aliens/ortnok body01 head02 2 // No Armor, Body: Scared legs, Head: Big scar over the right eye
aliens/ortnok body01 head03 0 // No Armor, Body: Big open wound, Head: One-eyed Ortnok
aliens/ortnok body01 head01 2 // No Armor, Body: Scared legs, Head: 2 small scars over the left eye
aliens/ortnok body01 head02 0 // No Armor, Body: Big open wound, Head: One-eyed Ortnok
aliens/ortnok body01 head03 1 // No Armor, Body: Big scar, Head: Big scar over the right eye
//==========================
// These 2 following line are not really necessary as they are the same as line 1 of the Ortnok definition, we keep them for better readability
//==========================
aliens/ortnok body01 head01 0 // Light Armor, Body: Just one version available, Head: Just one version available (others gfx are the same)
aliens/ortnok body01 head01 0 // Medium Armor, Body: Just one version available, Head: Just one version available (others gfx are the same)
}

I do not give up on this, but have to admit that everything in team_aliens.ufo is correct...  ;)
Nevertheless I will prepare a patch to enhance readability there...
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 24, 2010, 11:27:08 am
I really hope my assumptions are correct & I am not dreaming this ?!  ::)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 24, 2010, 06:16:19 pm
I will not use the same command twice, but rather adjust the comments  ;)
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 30, 2010, 10:58:39 am
Extended the wiki a little bit.
Title: Re: Help needed with ufo scripts...
Post by: MCR on April 30, 2010, 12:43:38 pm
Edited wiki again. Hope this is okay now.