Home   Help Search Login Register  

Author Topic: Addons Needed - Canteen, MRE  (Read 2369 times)

0 Members and 1 Guest are viewing this topic.

Offline Roni

  • Members
  • *
  • Play the Game !
Addons Needed - Canteen, MRE
« on: 20 Jul 2004, 03:27:16 »
Hello All

I am working on a number of scripts for a "survival" type mission, which will include fatigue, hunger and thirst scripts.  :P

Fatigue is easy - it goes up over time and is reduced by resting next to a campfire, tent or building.  I am also scripting hunger and thirst to work in the same way (goes up over time, goes down next to a campfire or building, respectively) but I was thinking that it would be neat if I could use some sort of water canteen and MRE (Meals, Ready to Eat) items instead.

What I am thinking is taking the standard grenade item and changing the name, model, symbol (in the Gear section of the Notepad) and config properties (ie - they don't blow up !) to make two new items - a "Canteen" item and an "MRE" item, which can be picked up, dropped, transferred or thrown (discarded) just like ordinary grenades.

The idea would be to put a number of these items in an ammo crate (say) then let the character take as many as they wanted, up to their carrying capacity.  I would then give the character the addActions "Eat MRE" and "Drink Canteen", which would remove one of these objects (if the character had them) and lower their recorded hunger or thirst ratings.

The problem is - I don't know how to make the Addons !    :-[ ???

Does anyone know if any such items already exist ?  Alternatively, could anyone make these items ?.  I'm not really too fussed about new models or images, so long as they have the right names and don't explode when they're thrown away !

Any help would be greatly appreciated !  Alternatively, if anyone could point me towards a simple grenade config modification tute I would be just as happy.  ;D

Thanks in advance !



Roni


Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Addons Needed - Canteen, MRE
« Reply #1 on: 20 Jul 2004, 08:56:23 »
I'm absolutley not an addon master but if you give me a pick on how a MRE pack looks like (I have somewhat idea, but not precise) I can see what I can do. The only problem is that I'm going away on vacation in an hour or so for 10 days. Oi. :P

:beat: *Gets Shot* :beat:

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #2 on: 20 Jul 2004, 09:35:56 »
Hi bananaman

Leaving in an hour ?  You'd better get coding then !  ;D

AFAIK, MRE packs are simply rectangular grey boxes about 6 inches square with some very small text stamped on the side in some low contrast ink like black or blue telling you what's inside. (Yumm - 8 month old peach cobbler in a can !   :P  )

Canteens are simple low sheen aluminum (or aluminium) bottles, usually held in a camo sleeve.

But what would I know - I was never in the military !  :-\

Actually, the models and images are not important - all I need is a non-exploding grenade that can be referred to from a script by name.  Sort of like -

; eatMe.sqs

player executes addAction "Eat Indigestable K-rations"
count MRE's
if player has no MRE's then exit
MRE=MRE-1
lower players hunger rating and stop him chewing on his buds arm.  :D

Of course, the player could swap, drop or discard his existing MRE's (or Canteens) and replace them with more grenades and magazines, but seeing as he's about to cross the wastes of Desert Everon he may wish to keep at least a few canteens on him . . .  :P

Anything that you provide would be great - don't make me force my man to eat his own smoke grenades !



Roni


Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Addons Needed - Canteen, MRE
« Reply #3 on: 20 Jul 2004, 09:40:31 »
OK, since my family is like the slowest people in universe that never get anything done I prolly ain't gonna leave untill noon. ;D

I can model and texture them for ya, but you need to find me a .cpp file cause I dunno shite about that.

:beat: *Gets Shot* :beat:

EDIT: Ohh crap, gtg now. Hope you get what you need from some1 else.
« Last Edit: 20 Jul 2004, 09:44:57 by The real Armstrong »

Dubieman

  • Guest
Re:Addons Needed - Canteen, MRE
« Reply #4 on: 20 Jul 2004, 16:41:39 »
Howsabouts a smoke grenade that doesn't smoke?
They don't explode nither. :D

The smoke grenade could be a canteen I suppose, but someone has to make a MRE.

But I'm no addon maker.... :P

Offline oyman

  • Members
  • *
  • king of pings
Re:Addons Needed - Canteen, MRE
« Reply #5 on: 21 Jul 2004, 05:01:43 »
on rudedogs m113 pack there was a MRE in a box, we can ask him if we could use it

o ya and i have a model of a canteen, its from the Bis soldier but it should get the job done :)
« Last Edit: 21 Jul 2004, 05:02:58 by oyman »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #6 on: 21 Jul 2004, 05:32:31 »
Problem Solved ! (kind of)  8)  :hmm:


After days scouring the net, following various threads and running through various tutes I finally struck upon the idea of DePBO'ing the Gimbal's Tosser pack that I had downloaded.

Brilliant !  ;D  ;D  ;D

The structure inside is dead easy to follow and has everything that I need.  All I have to do is change the various config references, models, textures and sounds and away I go.  I'm not making any new unit types (just two new Weapon types) so I can pretty much take the existing config entries and write in my own details (with the appropriate acknowledgement to Mr Gimbal, of course).  :D

Even better, while I was trying to decipher the various entries in the config file I decided to check out the master config file for the game.  Man that thing is huge !

I finally found out where all the recoil, sound and master control settings are and can start to buggarize them just like I've alway wanted !   ;D  I know that editing this file can get me into a whole world of hurt, but I know enough to save a copy of the original file before I get to work - I have had some experience in this area !   :noo:

Hopefully I will be able to sort this out within the next 24 hours.  One question though - does anyone know of any readily available utility that will read and create .paa and .pac files from the usual slew of jpegs and gifs ?  Once again - I've deduced that these are the graphics files for the object and its image in the Notepad in some sort of proprietary format, so all I need is the appropriate viewer and decoder, right ?   :-\

In keeping with the finest traditions of the community, I will be posting the new objects to the forum as and when they are finished.


@oyman - if you're offering the canteen p3d, I'll gratefully accept it - please post or em.  And if you know where I can get hold of a small grey cube p3d for the MRE pack I'll happily take that too !

My mission is almost finished - it's called "Cold, Wet and Hungry" and so far it runs like a charm !  Now, all I have to do is give my lost puppy some REAL things to eat and drink so he can stop eating those smoke grenades !  :D

Cheers All !



Roni

Stop Press ! - I found Texview !  Now maybe I'll try my hand at O2 !  ;D
« Last Edit: 21 Jul 2004, 06:03:37 by Roni »

Offline oyman

  • Members
  • *
  • king of pings
Re:Addons Needed - Canteen, MRE
« Reply #7 on: 21 Jul 2004, 16:18:43 »
so you want just a grey untextured cube?

Dubieman

  • Guest
Re:Addons Needed - Canteen, MRE
« Reply #8 on: 21 Jul 2004, 16:23:51 »
So can we throw the canteen at ppl and throw MREs at too?

 :D ;D

"I think the enemy is near LT., Pvt. Johnson just got hit with a MRE and Pvt. Pully got a canteen in the groin. The medics are tending to them now."

Offline oyman

  • Members
  • *
  • king of pings
Re:Addons Needed - Canteen, MRE
« Reply #9 on: 21 Jul 2004, 17:00:17 »
ok im done the canteen kinda sucks :P, i think someone  said they had a config file for these, so ill let them make one, al ya the MRE is in here too thanks to rudedog letting me use his textures

http://home.earthlink.net/~r_sandoval916/oyman_obj.pbo

just unpbo it, might have to do some texture path editing if you dont want them in my folder

« Last Edit: 21 Jul 2004, 17:05:12 by oyman »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #10 on: 22 Jul 2004, 01:11:14 »
AAARGGHHH !  You spend 15 minutes typing then try to attach a "Wrong" file and you lose all your work !!!  WHY ????  >:(  >:(  >:(



Take Two . . .

@oyman - Back when my brother was in the Army in 1976 the MRE's came in little grey cardboard boxes.  It looks like now they come in little green plastic sachets.  Type in MRE in Google Images to see what I mean.


@GuiltyRoachKilla - Yes indeed !  All I did was dePBO Gimbal's Tossers addon, edit the config, add my own images and sound and save it under a new directory.  I deleted a lot of stuff that was particular to Gimbal's addon (such as new units, new ammo crates etc) and changed various pathways but it's essentially the same thing.

I gave the Canteen and MRE items the very similar characteristics to the Rock item from that addon.  They do a minimal form of damage when they hit, don't explode and have no scope.  ;D

I gave them new images (for when you look at them in the Ntebook), but kept the default model, so I assume that when you throw them they will still look like grenades, which brings me to . . .


@oyman (again) - Thanks for the models - I'll dePBO them tonight and try again to get the addon working.  I PBO'd it three times last night but still couldn't get it to work.  I can give it to a unit (via addMagazine or addWeapon) but when I go to Preview the mission it says "no entry CfgWeapons.Canteen (or MRE).   :-\  :P  ???

I tried attach the config for public comment but that was when I lost all my previous typing.  Instead, I've decided to cut and post it all -



//      version 1.46 required
//      Addon Copyright Rory Deutsch (Roni) July 2004 - rory@romad.com.au
//       Feel free to use, abuse or misuse as you see fit - just don't charge for it.

//      Usage         = Add to player, object or other unit by use of addMagazine command

//      Also required      = N/A

//      This addon is best used with one or more exhaustion scripts - eg hunger or thirst (available).
//      Ensure that player's hunger and thirst ratings go down every time one of these items is consumed.

//      Thanks to Gimbal - this config was created from the config in his Gimbals Tossers addon.
//      Canteen and MRE models would be greatly appreciated.

//      PS - This is my first ever addon !



//      Define sides
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7


//      Define booleans
#define true 1
#define false 0


//      Define scopes
#define private 0
#define protected 1
#define public 2



//      Define patches
class CfgPatches
{
   class UN_forces
   {
      weapons[] = {Canteen, MRE};
      requiredVersion = 1.46;
   };
};


//      Define "Ammo" configuration specs
class cfgAmmo
{
   class Default {};
   class Grenade: Default {};
   class GrenadeHand: Grenade {};


//      Canteen "ammo"
   class Canteen: GrenadeHand
   {
      explosive=0;
      hit=1.5;
      indirectHit=0;
      indirectHitRange=1.000000;
      minRange=5;
      minRangeProbab=0.900000;
      midRange=20;
      midRangeProbab=0.700000;
      maxRange=40;
      maxRangeProbab=0.400000;
//      model="canteen";
      cost=2;
      canteenrattle1[]={"\rationpack\sounds\canteenrattle1.wav",0.05,1};
      canteenrattle2[]={"\rationpack\sounds\canteenrattle2.wav",0.05,1};
      canteenrattle3[]={"\rationpack\sounds\canteenrattle3.wav",0.05,1};
      hitGround[]={"canteenrattle1",0.600000,"canteenrattle2",0.300000,"canteenrattle3",0.100000};
      hitMan[]={"canteenrattle1",0.100000,"canteenrattle2",0.600000,"canteenrattle3",0.300000};
      hitArmor[]={"canteenrattle1",0.300000,"canteenrattle2",0.100000,"canteenrattle3",0.600000};
      hitBuilding[]={"canteenrattle1",0.330000,"canteenrattle2",0.330000,"canteenrattle3",0.330000};
   };


//      MRE "ammo"
   class MRE: GrenadeHand
   {
      explosive=0;
      hit=1;
      indirectHit=0;
      indirectHitRange=1.000000;
      minRange=5;
      minRangeProbab=0.900000;
      midRange=15;
      midRangeProbab=0.600000;
      maxRange=30;
      maxRangeProbab=0.100000;
//      model="MRE";
      cost=5;
      MREclunk1[]={"\rationpack\sounds\MREclunk1.wav",0.05,1};
      MREclunk2[]={"\rationpack\sounds\MREclunk2.wav",0.05,1};
      MREclunk3[]={"\rationpack\sounds\MREclunk3.wav",0.05,1};
      hitGround[]={"MREclunk1",0.600000,"MREclunk2",0.300000,"MREclunk3",0.100000};
      hitMan[]={"MREclunk1",0.100000,"MREclunk2",0.600000,"MREclunk3",0.300000};
      hitArmor[]={"MREclunk1",0.300000,"MREclunk2",0.100000,"MREclunk3",0.600000};
      hitBuilding[]={"MREclunk1",0.330000,"MREclunk2",0.330000,"MREclunk3",0.330000};
   };

};


//      Define "Weapon" configuration specs
class cfgWeapons
{
   class Default {};
   class GrenadeLauncher: Default {};
   class Throw: GrenadeLauncher {};


//      Canteen "weapon"
   class Canteen: Throw
   {
      ammo="Canteen";
      picture="\rationpack\images\Canteen.paa";
      displayName="Canteen";
      displayNameMagazine="Canteen";
      shortNameMagazine="Canteen";
      dispersion=0.002000;
      initSpeed=20;
      reloadTime=0.500000;
      count=1;
   };


//      MRE "Weapon"
   class MRE: Throw
   {
      ammo="MRE";
      picture="\rationpack\images\MRE.paa";
      displayName="MRE";
      displayNameMagazine="MRE";
      shortNameMagazine="MRE";
      dispersion=0.003000;
      initSpeed=15;
      reloadTime=0.600000;
      count=1;
   };

};


Any comments or suggestions greatfully appreciated 1

Cheers



Roni

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #11 on: 22 Jul 2004, 02:55:40 »
Hey oyman - my DePBO utility can't DePBO your addon ? !   :'(  It keeps saying something like "List index out of bounds (0)"

Any ideas ?   ???

I've started DePBO'ing a bunch of other addons - maybe I'll find the answer to my problem in there . . .


Cheers All !



Roni

Offline oyman

  • Members
  • *
  • king of pings
Re:Addons Needed - Canteen, MRE
« Reply #12 on: 22 Jul 2004, 03:37:59 »
it wontl let you open it? that wierd ill upload the folder

go here and download everything
http://home.earthlink.net/~r_sandoval916/oyman_obj/

ill try and look for the little grey boxes MREs too
« Last Edit: 22 Jul 2004, 03:41:36 by oyman »

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #13 on: 22 Jul 2004, 05:17:32 »
Thanks oyman, I've got the p3ds in the folder now.

I've just gone through EVERY SINGLE post in the Addons forum and have found out lots more about cpp editing.  I'll try out my latest skills tonight when I get home.

Food and Water - only a short while away !  :D


roni

Dubieman

  • Guest
Re:Addons Needed - Canteen, MRE
« Reply #14 on: 22 Jul 2004, 05:33:54 »
Sounds good. I guess if you don't like 15 month old ham&eggs you can toss it, literally. :D ;D

If you put this into your mission, will it be of high importance to have these or will time be accelrated to reflect actually needing these items?

And can we steal them from enemy soldiers? :)