Home   Help Search Login Register  

Author Topic: Addons Needed - Canteen, MRE  (Read 2368 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? :)

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #15 on: 22 Jul 2004, 05:57:55 »
Oh, these items will be necessary all right !

I've completed about 90% of the mission, there are just one or two scripts to finish (hunger.sqs and thirst.sqs) and I'll be ready to test it all out.

Basically, you start in an Army Cessna on a simple mail run to Malden.  The problem is - you have no compass, no map and no fuel.  It's 5:30 at night, visibility is down to 400m and it's pissing down rain.  The plane is breaking up and it looks like your only option is to bail out (or trust your life to the landing skills of the AI pilot !).  Oh, and did I mention that you have no weapons apart from your side arm ?   ;D

I have a time dilation script running that makes each day pass in about 12 minutes.  The Fatigue script will start to knock you out once you go more than 12 hours without sleep (via a VERY slow BLACK OUT titlecut !), so that after 36 hours without sleep all will be black.  If you're playing MP your only chance at that stage is to get your bud to lead you ("left, now right . . "   :P ), otherwise you just have to lie down and wait to wake up.

You can recover lost fatigue by building a camp and/or a fire via your addactions, or finding a nice dry building to curl up in.  Obviously, being warm and in bed is better than being cold so you had better light that fire no matter where you sleep !  But you'd better watch out for the Russians !

Didn't I mention them ?   ;)  Well, there are a number of groups chasing you, all using two special scripts - one which tops up their losses (adds new units to the group every 2 minutes) and the other which continually resets their "Seek and Destroy" waypoint onto your sorry little head !  Your ONE saving grace is that the rate at which it is reset depends upon their "knowsAbout" rating, so if you stay low and keep moving you should be okay  :-[  :help:

But of course you will have to stop and eat at some stage, won't you ?  That's where the canteens and MRE's come in.  I'm going to start you with NONE (I'm a BAD man !), but of course yet ANOTHER script running in the background "may" create them for you inside any building you pass.

So, running, hiding, looting, resting, eating, crawling, drinking, sleeping - it should all be good !  Your group will have three members and Group respawn, so you will in effect have three lives

All in all it should be way sweet !  And of course I will post the lot once it's finished.

Cheers



Roni

PS - oyman - I'll credit you in the addon for the models - thanks again !  :)


Dubieman

  • Guest
Re:Addons Needed - Canteen, MRE
« Reply #16 on: 22 Jul 2004, 06:06:16 »
Sounds cool, it revamps the old west vs. east crap that we are all tired of. I hope these addons are only like 50kb or smaller. The mission will really be playable. And Army cennsa? Ahh well good luck with it. Can't wait to beta it. :)

(the sovs got a base, clear it so we can take it.  next mission, defend our base from those odd soviets, it seems they won't leave us alone...)

Offline oyman

  • Members
  • *
  • king of pings
Re:Addons Needed - Canteen, MRE
« Reply #17 on: 22 Jul 2004, 16:44:12 »
PS - oyman - I'll credit you in the addon for the models - thanks again !  :)

dont forget to credit Rudedog for the textures on the MRE

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Addons Needed - Canteen, MRE
« Reply #18 on: 22 Jul 2004, 23:59:12 »
[size=18]It's Finished ! [/size]  :cheers:


It's not perfect, but after about a dozen compilations I finally got it working !  I'm still not quite sure what i did, but from what i can tell it looks as if new grenade type objects (at least) need to have a new associated "Throw" weapon and a new Unit type to carry it.  :-\

I'm not sure which of these is truly necessary but I decided in the end to make a new Civilian unit type (Supplies Carrier) and it works a charm.  I tested it out by attaching a whole bunch of these guys to an East unit and a West unit - you should see those canteens fly !  :gunman:  :help:  :tomato:

Unfortunately, the addon weighs in at around 480 kb (90% of which is made up of sound files), which is too big to attach here.  If anyone knows how to host this or if you want me send it to you please let me know.

One other quirk.  As I said - I wasn't really sure what I was doing, but I've somehow ended up creating a "Canteen" and "MRE" weapons as well as "Canteen" and "MRE" magazines.  Before you can get your units to throw their lunches at other people you need to give them the appropriate weapon first.  It looks as if your Canteen can't be a weapon unless you've got the appropriate launcher !  ???  :P

Well, nuff for now.  AS I said - if anyone can help me host the addon or wants me to send it to them directly please let me know.

And to oyman, Rudedog, Gimbal and all the rest who helped -  THANK YOU !

:thumbsup:


ROni

PS - Coming up - empty canteens vs full ones, ruck sacks and webbings.  Apparently you can attach scripts to these things - I'm going to try nd make a Bag of Holding !

Cheers !
« Last Edit: 23 Jul 2004, 03:16:02 by Roni »