Board index Downloads Deus Ex MP Mods ]

FoliageFactory


Author
Message
[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 12:53


Hi!
It's my first script, and it works. It summons foliages within it's CollisionRadius. Useful for outdoor maps.
Previews:
Image
Image


You do not have the required permissions to view the files attached to this post.
Image

deadmau5 is Canada's apology for Justin Bieber!!
Image
chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: FoliageFactory - Postby chin.democ. » 26 Jul 2011, 13:52


So foliage appears in a circle around you? If so this could be very useful.


[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


Re: FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 14:04


It's a simple generator, the foliage appears around the FoliageFactory


Image

deadmau5 is Canada's apology for Justin Bieber!!
Image
~DJ~
Teh 1337'
Teh 1337'
User avatar

Posts: 2647
Joined:
 29 Jun 2008, 13:18


Re: FoliageFactory - Postby ~DJ~ » 26 Jul 2011, 14:16


Awesome.

I had a go at the real thing ages ago though, never finished it.. This would be the best illusion.. latest game(s) use these aswell.. :-D

This isn't exactly that though, It wouldn't keep repeating if I'm getting you correctly.. It would only summon per map actor you place on the area...


Last edited by ~DJ~ on 26 Jul 2011, 14:18, edited 1 time in total.
That Resident Evil Mod
————
~][FGS][Nobody~ wrote:DONT SEARCH WORDS ON GOOGLE WITHOUT TINKING

~[FGS]SaSQuATcH~ wrote:you+serious=error

chin.democ. wrote:It's just what you're doing with your right hand that worries me....
chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: FoliageFactory - Postby chin.democ. » 26 Jul 2011, 14:16


Oh I see, so it's a handy time saver when doing outdoor areas.


~][FGS][Nobody~
Illuminated
Illuminated
User avatar

Posts: 5359
Joined:
 26 Oct 2005, 16:59
Location:
 Schland!
Nationality:
Germany


Re: FoliageFactory - Postby ~][FGS][Nobody~ » 26 Jul 2011, 14:36


This is a simple but actually groundbreaking idea.
That way a map wouldn't always have the same look and perhaps it could even effect the gameplay.
Just imagine extending that ideas to decorative elements like crates. One single map would give slighty different conditions on every match. :o


Nobody is perfect...
-----------------------
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.

Magus wrote:Maybe one day I will understand your arcane rituals of voting :)

chin.democ. wrote:You can use light bulbs that emit light, and when shot, do not.

synthetic wrote:and while every person is interesting in their own unique ways, there is some degree of uniqueness that a doctor can help with.

~ô¿ô~][FGS][Nobody~ said: THERE IS NO SPOON!
~¤¥ÐJ¥¤~ said: THERE IS NO CAKE!
[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


Re: FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 15:43


In the UDK, there is a volume called FoliageFactory. I tried to make that class for Deus Ex.


Image

deadmau5 is Canada's apology for Justin Bieber!!
Image
chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: FoliageFactory - Postby chin.democ. » 26 Jul 2011, 15:48


How does the foliage spawn, is it all at once, is it in random locations?


[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


Re: FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 16:20


Yeah, it spawns in random locations and all at once, but it can't spawn more than 1000.


Image

deadmau5 is Canada's apology for Justin Bieber!!
Image
~[FGS]SaSQuATcH~


Posts: 3629
Joined:
 04 Jun 2008, 12:21


Re: FoliageFactory - Postby ~[FGS]SaSQuATcH~ » 26 Jul 2011, 16:28


Is it based on the 'spawnmass' command?


chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: FoliageFactory - Postby chin.democ. » 26 Jul 2011, 16:29


So Nobody is right in saying you could have a different looking map every time it loads, now that is cool, I wonder what else it could be used for? crates is interesting, but I'm sure there's more interesting things to spawn too.


~][FGS][Nobody~
Illuminated
Illuminated
User avatar

Posts: 5359
Joined:
 26 Oct 2005, 16:59
Location:
 Schland!
Nationality:
Germany


Re: FoliageFactory - Postby ~][FGS][Nobody~ » 26 Jul 2011, 16:50


Well, continuing that thought.. more interesting objects would be a kind of predefined object combinations, like stacked crates.. or stuff like emps behind or below some spawned object!

Apart of all that creative ideas..
A pretty big issue would be the conception of a proper algorithm that defines and also enforces some rules about: where what kind of objects could be placed and where they are misplaced. :-k


Nobody is perfect...
-----------------------
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.

Magus wrote:Maybe one day I will understand your arcane rituals of voting :)

chin.democ. wrote:You can use light bulbs that emit light, and when shot, do not.

synthetic wrote:and while every person is interesting in their own unique ways, there is some degree of uniqueness that a doctor can help with.

~ô¿ô~][FGS][Nobody~ said: THERE IS NO SPOON!
~¤¥ÐJ¥¤~ said: THERE IS NO CAKE!
[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


Re: FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 17:24


Here is the code:
FoliageFactory:
Code: Select all
class FoliageFactory expands Effects;

var(Foliage) int NumberOfFoliage;
var(Foliage) Mesh FoliageMesh;
var(Foliage) Texture FoliageTexture[4];
var FoliageProxy proxy;

function PostBeginPlay()
{
local int i;
local float distance;
local rotator r;
local vector loc;
local int direction;


Super.PostBeginPlay();
   
do
{
direction=Rand(65535);
distance=FRand()*CollisionRadius;
r=RotRand();
r.Pitch=0;
r.Roll=0;
loc=Location+(Vector(r)*distance);
proxy = Spawn(Class 'FoliageProxy', Self,,loc, r);
if (proxy != None)
      if (proxy.Mesh != FoliageMesh)
         SetProxyData();
         i=i+1;
} until ( i == NumberOfFoliage );
}
simulated function SetProxyData()
{
local int i;
i = Rand(41);
if (proxy != None)
   {

      if (FoliageMesh != None)
         proxy.Mesh = FoliageMesh;
         if (i== 0 && i<11)
         {
         proxy.MultiSkins[0] = FoliageTexture[0];
         }
         else if (i>10 && i<21)
         {
         proxy.MultiSkins[0] = FoliageTexture[1];
         }
         else if (i>20 && i<31)
         {
         proxy.MultiSkins[0] = FoliageTexture[2];
         }
         else if (i>30 && i<41)
         {
         proxy.MultiSkins[0] = FoliageTexture[3];
         }
      
   }

}

defaultproperties
{
     NumberOfFoliage=1
     bHidden=True
     DrawType=DT_Sprite
     Texture=Texture'Engine.S_Inventory'
     CollisionRadius=256.000000
     CollisionHeight=32.000000
     bCollideActors=True
}

FoliageProxy:
Code: Select all
class FoliageProxy expands ParticleProxy;

defaultproperties
{
     Physics=PHYS_Falling
     DrawType=DT_Mesh
     Style=STY_Normal
     Mesh=LodMesh'DeusExDeco.Basket' <-----LOL, I forgot to change back
     DrawScale=1.000000
     CollisionRadius=22.000000
     CollisionHeight=22.000000
}

It spawns a lot of FoliageProxy, then it changes it's mesh and texture. But I think it can spawns any type of decoration.


Image

deadmau5 is Canada's apology for Justin Bieber!!
Image
~][FGS][Nobody~
Illuminated
Illuminated
User avatar

Posts: 5359
Joined:
 26 Oct 2005, 16:59
Location:
 Schland!
Nationality:
Germany


Re: FoliageFactory - Postby ~][FGS][Nobody~ » 26 Jul 2011, 17:42


Yeah, I've already looked at the code within the package you provided. :oops:

Just one thing.. for the sake off efficiency, you could replace
Code: Select all
if (i== 0 && i<11)
         {
         proxy.MultiSkins[0] = FoliageTexture[0];
         }
         else if (i>10 && i<21)
         {
         proxy.MultiSkins[0] = FoliageTexture[1];
         }
         else if (i>20 && i<31)
         {
         proxy.MultiSkins[0] = FoliageTexture[2];
         }
         else if (i>30 && i<41)
         {
         proxy.MultiSkins[0] = FoliageTexture[3];
         }
with
Code: Select all
proxy.MultiSkins[0]=FoliageTexture[i % ArrayCount(FoliageTexture)];


Nobody is perfect...
-----------------------
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.

Magus wrote:Maybe one day I will understand your arcane rituals of voting :)

chin.democ. wrote:You can use light bulbs that emit light, and when shot, do not.

synthetic wrote:and while every person is interesting in their own unique ways, there is some degree of uniqueness that a doctor can help with.

~ô¿ô~][FGS][Nobody~ said: THERE IS NO SPOON!
~¤¥ÐJ¥¤~ said: THERE IS NO CAKE!
[FGS]Kalman
Throne/6G
Throne/6G
User avatar

Posts: 939
Joined:
 20 Aug 2010, 15:52
Location:
 9th circle of hell
Nationality:
Hungary


Re: FoliageFactory - Postby [FGS]Kalman » 26 Jul 2011, 17:50


Thanks, I'm just a begginer :D
Edit: I get this error: D:\Játékok\DeusEx\FoliageFactory\Classes\FoliageFactory.uc(49) : Error, Bad or missing expression in array index
Failed due to errors.


Image

deadmau5 is Canada's apology for Justin Bieber!!
Image


Return to MP Mods

Who is online

Users browsing this forum: No registered users and 2 guests