project-navigation
Personal tools

Author Topic: Question for modding  (Read 26796 times)

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Question for modding
« on: May 04, 2014, 06:11:52 am »
Hi, nice to stay on this forum. This is a great game!

I`m playing 2.4 on linux. I`m triyng to do a new clip for assault rifle (armour piercing). I wrote the research and weapon_human files but my clip doesn`t works. I don`t know what i`m do wrong.

I only copy and paste the "rs_weapon_assault_ammo" and rename "rs_weapon_assault_AP_ammo" on the RESEARCH file and i copy and paste the "item assault_ammo" with the name "item assault_AP_ammo" on the weapon_human file.

Can anyone help me?

Another question. Where is the .txt files? i want to do some work on it, but in don`t know where they are.

Thanks.

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: Question for modding
« Reply #1 on: May 04, 2014, 01:07:28 pm »
Bit difficult to say whats wrong without any files to check...try downloading my weapon mod  http://ufoai.org/forum/index.php/topic,8001.0.html  its for 2.5 but the file layout is identical
   And look at the revolver entries in research_ajg.ufo (the 3rd, 4th and 5th tech entries) and revolver.ufo for weapon and weapon mod (ammo) set up. The revolver has 2 ammo types and as its on its own in the file its easier to see whats going on.
   If you have copied and pasted from the original files it's probably a missed bracket or typo so carefully check everything.
   
Hope this helps a bit.

*Edit*
I just noticed you dont mention the new ammo model you MUST have a model and I seem to remember you can not just point it at an existing model. However you can copy and rename the normal clip .md2 file (say to assault_ap) and point the weapon model data to that file.
« Last Edit: May 04, 2014, 01:31:10 pm by AntJam »

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #2 on: May 04, 2014, 04:25:38 pm »
Thanks Antjam.

I will see your mod. I do the work before using the same model of the assault clip and it works, but i trying to do again but it doesn`t work.

Well, i will follow your advice.

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: Question for modding
« Reply #3 on: May 04, 2014, 05:05:31 pm »
I made this in case your still having trouble. Once again its tested from 2.5 but should work. It adds ap ammo for assault rifle with 50 damage and heavy bullet weight plus a tech entry in civopedia and a duplicate ammo model. The text files are in the msgid folder by the way.

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #4 on: May 04, 2014, 05:43:34 pm »
Thanks!

Well, i saw and it`s very similar to my mod. I will post it

weapon_human.ufo

item assault_AP_ammo
{
   name         "_Assault Rifle Magazine"
   model         weapons/assault/assault_clip
   type         ammo
   animationindex   0
   shape         "0 0 1 2"
   center         "0 0 0"
   scale         1.25
   price         100
   size         3
   is_primary      true
   dmgtype         normal

   weapon_mod assault
   {
      firedef
      {
         name      "_Snap Shot"
         skill      assault
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "1.2 1.2"
         crouch      0.7
         range      70
         shots      1
         ammo      1
         time      8
         damage      "52 5"
         dmgweight   normal_medium
         reaction   true
      }
      firedef
      {
         name            "_3-Round Burst"
         skill            assault
         projtl            bullet
         impact            bulletImpact
         hitbody            null
         firesnd            weapons/bullet-rifle-3x
         impsnd            impact/bullet-impact
         bodysnd          impact/bullet-bodyimpact
         sndonce            true
         speed            3000
         spread            "1.6 1.6"
         crouch            0.7
         range            70
         shots            3
         ammo            3
         delaybetweenshots   10
         time            12
         damage            "52 5"
         dmgweight         normal_medium
         reaction         true
      }
      firedef
      {
         name            "_Full-Auto"
         skill            assault
         projtl            bullet
         impact            bulletImpact
         hitbody            null
         firesnd            weapons/bullet-rifle-8x
         impsnd            impact/bullet-impact
         bodysnd          impact/bullet-bodyimpact
         sndonce            true
         speed            3000
         spread            "2.1 2.1"
         crouch            0.7
         range            70
         shots            8
         ammo            8
         delaybetweenshots   10
         time            18
         damage            "52 5"
         dmgweight         normal_medium
      }
      firedef
      {
         name      "_Aimed Shot"
         skill      assault
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "1 1"
         crouch      0.7
         range      70
         shots      1
         ammo      1
         time      14
         damage      "52 5"
         dmgweight   normal_medium
      }
   }

   weapon_mod vhs
   {
      firedef
      {
         name      "_Snap Shot"
         skill      assault
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "1.0 1.0"
         crouch      0.7
         range      250
         shots      1
         ammo      1
         time      8
         damage      "45 5"
         dmgweight   normal_medium
         reaction   true
      }
      firedef
      {
         name            "_3-Round Burst"
         skill            assault
         projtl            bullet
         impact            bulletImpact
         hitbody            null
         firesnd            weapons/bullet-rifle-1x
         impsnd            impact/bullet-impact
         bodysnd          impact/bullet-bodyimpact
         speed            3000
         spread            "1.2 1.2"
         crouch            0.7
         range            70
         shots            3
         ammo            3
         delaybetweenshots   5
         time            10
         damage            "45 5"
         dmgweight         normal_medium
         reaction         true
      }
      firedef
      {
         name            "_Full-Auto"
         skill            assault
         projtl            bullet
         impact            bulletImpact
         hitbody            null
         firesnd            weapons/bullet-rifle-1x
         impsnd            impact/bullet-impact
         bodysnd          impact/bullet-bodyimpact
         speed            3000
         spread            "1.8 1.8"
         crouch            0.6
         range            70
         shots            6
         ammo            8
         delaybetweenshots   10
         time            16
         damage            "45 5"
         dmgweight         normal_medium
      }
      firedef
      {
         name      "_Aimed Shot"
         skill      assault
         projtl      bullet
         impact      bulletImpact
         hitbody      null
         firesnd      weapons/bullet-rifle-1x
         impsnd      impact/bullet-impact
         bodysnd    impact/bullet-bodyimpact
         speed      3000
         spread      "0.75 0.75"
         crouch      0.6
         range      70
         shots      1
         ammo      1
         time      12
         damage      "45 5"
         dmgweight   normal_medium
      }
   }
}



And research.ufo


tech rs_weapon_assault_AP_ammo
{
   name   "_Plasma And The Grenade Launcher"
   type   weapon
   up_chapter   equipment

   description {
      default "_grenl_plasma_ammo_txt"
   }
   pre_description {
      default "_grenl_plasma_ammo_pre_txt"
   }

   mail_pre
   {
      from   "_mail_from_paul_navarre"
      to      "_mail_to_base_commander"
      // subject   defined by "name"
      icon   icons/mail_tech
   }

   mail
   {
      from   "_mail_from_paul_navarre"
      to      "_mail_to_base_commander"
      // subject   defined by "name"
      icon   icons/mail_tech
   }

   require_AND
   {
      tech rs_alien_body_armour
   }
   provides   assault_AP_ammo
   time   2500
   producetime   12
}



Notice that i`m using the plasma grenade as a base for my mod (because i know that works) and the assault rifle magzine. I will use your mod for testing.

And another question, where is the .txt files? I don`t found them.
« Last Edit: May 04, 2014, 05:48:26 pm by cevaralien »

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #5 on: May 04, 2014, 05:58:27 pm »
My friend, i used your mod but it failed. Simply, the clip don`t show. I`m thinking it could be problem with the game itself.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Question for modding
« Reply #6 on: May 04, 2014, 06:04:52 pm »
What do you mean by '*.txt files' ? The translations ?

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: Question for modding
« Reply #7 on: May 04, 2014, 08:12:00 pm »
Yeah thats odd as I had it working in 2.5 even went to battlescape and killed an alien with them although you do have to manufacture a few first. But they should appear in the ufopedia immediately as there are no tech requirements.
 Are you placing the files direct into the base directory or creating a mod folder and putting them there then starting as per http://ufoai.org/wiki/Mod

By .txt do you mean the "_grenl_plasma_ammo_txt" as these are in the msgid folder in the  weapons.ufo file. As far as I'm aware UFOAI doesnt use any .txt files other than a few readme's


Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #8 on: May 06, 2014, 03:35:13 am »
Quote
Are you placing the files direct into the base directory or creating a mod folder and putting them there then starting as per http://ufoai.org/wiki/Mod

I`m placing it on the base directory. All my mods are there.

Quote
By .txt do you mean the "_grenl_plasma_ammo_txt" as these are in the msgid folder in the  weapons.ufo file. As far as I'm aware UFOAI doesnt use any .txt files other than a few readme's

Yeah, i means that. That folder, msgid, isn`t on my 0ufos.pk3 or another .pk3 file. Can you explain me more about de msgid folder please? I want to do a research report for the researched ammo clip (that from Commander Navarre) but i don`t know where are these files.

thanks for your patience  ;D


------

Last modifying:

I`m now using linux, a distro based on debian wheezy. Before, i was using windows and i remember that folder. I will search in my windows-based computer.
« Last Edit: May 06, 2014, 03:46:45 am by cevaralien »

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Question for modding
« Reply #9 on: May 06, 2014, 04:05:18 am »
AFAIK 2.4 doesn't have the msgid (nor mods) directory, you had to add things to the *.po files back then...

I'm assuming you already researched the prerequisites, right?
« Last Edit: May 06, 2014, 04:12:19 am by DarkRain »

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: Question for modding
« Reply #10 on: May 06, 2014, 12:40:23 pm »
Damn...sorry to have lead you down the garden path cevaralien in my defence I did alot of model testing in 2.4 but switched  for the actual mod as there was a major weapon re-balance in 2.5. Anyway I hope you can get it sorted (or get a copy of 2.5 it is a better all round game).

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #11 on: May 07, 2014, 02:03:54 am »
Damn...sorry to have lead you down the garden path cevaralien in my defence I did alot of model testing in 2.4 but switched  for the actual mod as there was a major weapon re-balance in 2.5. Anyway I hope you can get it sorted (or get a copy of 2.5 it is a better all round game).

Don`t worry my friend. I want to install 2.5 but i use linux and i`m not expert working with the system. I need a compiled version, just like de 2.4.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Question for modding
« Reply #12 on: May 07, 2014, 05:38:52 am »
Oh, you might want to share your ufoconsole.log there might be some error message that indicates what the problem is (see our FAQ)

Offline Grug

  • Rookie
  • ***
  • Posts: 56
    • View Profile
Re: Question for modding
« Reply #13 on: May 10, 2014, 11:06:35 am »
Don`t worry my friend. I want to install 2.5 but i use linux and i`m not expert working with the system. I need a compiled version, just like de 2.4.
There is an official Debian release being developed by apo (a Debian Games Dev). You can get the testing packages here: ftp://46.182.19.209/ufoai/

The thread can be found here: http://ufoai.org/forum/index.php/topic,7862.0.html

Offline cevaralien

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: Question for modding
« Reply #14 on: May 11, 2014, 03:14:23 am »
Oh, you might want to share your ufoconsole.log there might be some error message that indicates what the problem is (see our FAQ)

Ok, i will post my ufoconsole soon.