[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS • View topic - Random spawn items?

Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Sat May 04, 2024 2:17 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Random spawn items?
PostPosted: Thu Nov 15, 2007 3:58 am 
Offline

Joined: Thu Oct 11, 2007 11:43 pm
Posts: 9


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 4:09 am 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
post your scoutcarspawner code too so we can see what's attached to it..


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 11:51 am 
Offline

Joined: Thu Oct 11, 2007 11:43 pm
Posts: 9


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 1:34 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 7:15 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782
Well lets start by defining exactly what you want random.
Do You Want?

Random Type of Kit

Random Spawn Position, and Rotation

or

Both.

And now we look at what we all know is possible with bf1942 engine, serverside or not.

Random Weapons for kits, this can be seen put to good use in Forgotten hope.

Random Spawn Points (Spawn Points on the Same Spawn Group that have Randomized Locations)

There might be, and probably is more. But those are two that i know can be done.

Since kits are not attached to a spawn group, but rather a spawn template, the random spawn by Group Number seems impossible. Unless the Spawn Group code can work for kits, but i dont believe it will.

Random Kits for weapons, are done by putting multiple weapons coding into the same objects.con, and naming them as one. The computer doesnt know which gun you want, and randomly chooses one for you. This cannot Be applied to kits thus i dont believe it will work.

Now, There is the Kit Type code in the init.cons of levels that interest me on this subject. As you See in them that they have this type of code:

game.setkit 1 0 German_Scout.

The 1 Represents What team, as the 0 represents the Kits Number. Could this inturn be applied to a Spawn Template to produce a randomized type of Spawn? like this:

ObjectTemplate.create ShermanSpawner
ObjectTemplate.setObjectTemplate 2 0 Sherman
ObjectTemplate.setObjectTemplate 2 1 T-34/85

I have not personally tried this, but if it does work it might result in a Randomized spawn, where it spawns a different object each time.

Now There is Also Code in the BF1942.exe you can read using the Text Scan, that Says This, but im assuming it was part of an underbrush creator that never got finished:

EnableRandScale
EnableRandRotation
EnableRandPosition
EnableRandOffset
EnableRandTilt
EnableRandColor

randScaleHeight
randScaleWidth
randPosVariance
randOffset
randColorMin
randColorMax
randAllObjectsOfTemplate <-- Most interesting

I do not know if these codes along with

ObjectTemplate
Though in the Scan they are Under ObjectTemplate:
8464100,Char,15,ObjectTemplate:
8464116,Char,32, not found. object.create fails!
8464172,Char,23,world::IObjectTemplate*
8464196,Char,15,world::IObject*
8464220,Char,21,listObjectsOfTemplate
8464252,Char,11,Objects.con
8464272,Char,17,setObjectToGround
8464292,Char,12,getGroundPos
8464308,Char,15,defaultSaveFile
8464324,Char,29,const world::IObjectTemplate*
8464384,Char,19,ObjectTemplates.con
8464412,Char,20,saveAllUsedTemplates
8464436,Char,16,deleteAllObjects
8464456,Char,11,listObjects
8464468,Char,23,getActiveObjectTemplate
8464492,Char,15,getActiveObject
8464508,Char,16,saveAllTemplates
8464528,Char,14,saveAllObjects
8464544,Char,15,saveAllSpawners
8464560,Char,12,saveSpawners
8464576,Char,26,saveAllTemplatesAndObjects
8464604,Char,14,loadAllObjects
8464620,Char,26,loadAllTemplatesAndObjects
8464648,Char,15,listAllVehicles
8464664,Char,18,updateAllTemplates
8464684,Char,13,listTemplates
8464700,Char,15,setActiveObject
8464716,Char,23,setActiveObjectTemplate
8464740,Char,24,moveActiveObjectToCamera
8464768,Char,24,moveCameraToActiveObject
8464796,Char,14,deleteTemplate
8464812,Char,14,updateTemplate
8464828,Char,12,deleteObject
8464844,Char,27,printTemplateCreationScript
8464872,Char,25,printObjectCreationScript
8464900,Char,19,quickReloadTemplate
8464920,Char,25,quickReloadActiveTemplate
8464948,Char,18,saveTemplateToFile
8464968,Char,14,saveAllEffects
8464984,Char,19,saveFolderToArchive
8465004,Char,12,saveVehicles
8465020,Char,10,listMeshes
8465032,Char,12,listTextures
8465048,Char,15,deleteAllLayers
8465064,Char,14,getActiveLayer
8465080,Char,16,getActiveLayerId
8465100,Char,10,listLayers
8465112,Char,14,setActiveLayer
8465128,Char,16,setActiveLayerId
8465148,Char,11,removeLayer
8465184,Char,11,renameLayer
8465196,Char,14,createNewLayer
8465212,Char,15,ShowEntryPoints
8465228,Char,11,fixToGround
8465240,Char,17,fixToGroundHeight
8465260,Char,10,isStrafing
8465280,Char,18,enableChildEditing
8465300,Char,19,disableChildEditing
8465320,Char,11,setStrafing
8465332,Char,22,setForceCameraToGround
8465356,Char,15,setCameraHeight
8465372,Char,23,showObjectEditorObjects
8465408,Char,18,setRotatingAxisYPR
8465428,Char,18,setPositionAxisDUR
8465448,Char,18,getRotatingAxisYPR
8465468,Char,18,getPositionAxisDUR
8465488,Char,17,ObjectEditorState
8465532,Char,17,setCameraPosition
8465552,Char,14,moveAllObjects
8465568,Char,15,enableRandScale
8465584,Char,18,enableRandRotation
8465604,Char,18,enableRandPosition
8465624,Char,16,enableRandOffset
8465644,Char,14,enableRandTilt
8465660,Char,15,enableRandColor
8465676,Char,15,randScaleHeight
8465692,Char,14,randScaleWidth
8465708,Char,15,randPosVariance
8465736,Char,10,randOffset
8465748,Char,12,randColorMin
8465764,Char,12,randColorMax
8465780,Char,24,randAllObjectsOfTemplate

Another Way to Simulate this, would be to create Multiple Spawners With the Same object, your kit, and make them spawn at different times, One in 10 Seconds, the Other in 60, another in 15 minutes. And timing them just right so that when one spawns, there are no others on the map, by editing the TimeToLive commands.

Try some of these. I will try some myself, in hopes of finding an answer.


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 10:53 pm 
Offline

Joined: Thu Oct 11, 2007 11:43 pm
Posts: 9
Well my idea was pretty much have a modded weapon spawn randomly, so that people can't just go back to where it was originally whenever they lose it. They'd have to search for it. Then Iced Earth told me to try the Radar tower and use that but it has not been working. And I'd want a specific kit spawn randomly, either within a radius or on the map.


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 11:02 pm 
Offline

Joined: Mon Aug 16, 2004 12:00 am
Posts: 2120


Top
 Profile  
 
 Post subject: Re: Random spawn items?
PostPosted: Thu Nov 15, 2007 11:14 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 235 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group