Mod Question Repository... Questions come in, answers go out - Page 15

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

ok

Post by rcdraco »

I have a question, is there a combine objects feature in upspring? I made a mistake in Wings, and now I have way too many objects. Also, is there a way to sort the objects and link them to other objects? Such as:

Code: Select all

[Base]
  |
  |---[Gun]
  |    |
  |  [Barrel]
  |
  |---[Tred]
Last edited by rcdraco on 06 Oct 2007, 23:48, edited 1 time in total.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Take 2 minutes to look through all the menus and buttons? Seriously..
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

no

Post by rcdraco »

Thanks Peet, that helped. As with most problems, it would've been better not to ask.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Halp, I R doin it wrong...

I can't get the 15 infantry I want to be transported to get their lazy bums in the vehicle...

Code: Select all

	TransportCapacity=15;
	TransportMass=2500;
	TransportSize=2;
What do I need besides this?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Why's TransportCapacity not in the changelog?

Your script is probably messed up or your soldiers are fat americans which exceed the mass limit. :P
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

well

Post by rcdraco »

This might help a lot for you:

These are loaded by the engine:
transportcapacity - Max units
TransportMass - Max weight the transport holds.
transportsize - that is the Max X, and Max Z of units it picks up.
I think you're over the max transport size, 2x2 is small, all of my turrets in BloX are 4x4. And they are small.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Infantry were 1x1...

Alright, got it fixed, kudos to smoth..

Really simple script actually. Just attach-unit unitid/drop-unit unitid...
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

New post :P

Would be three in a row, if I didn't delete my old one.

I am asking again, is it possible to use unitid to find if a unit is nearing completion of being built?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Code: Select all

#define UNIT_BUILD_PERCENT_LEFT 73
static-var unitCompleteness;
...
unitCompleteness=get UNIT_BUILD_PERCENT_LEFT(unitID);
Is that what you were looking for?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

The smaller the number the more complete by the way, I often used a "while (get BUILD_PERCENT_LEFT) sleep 250;" loop in the Create() function so certain endless loops for animations don't get called right away.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

yuritch wrote:

Code: Select all

#define UNIT_BUILD_PERCENT_LEFT 73
static-var unitCompleteness;
...
unitCompleteness=get UNIT_BUILD_PERCENT_LEFT(unitID);
Is that what you were looking for?
So, that would get the unit currently being builts health?

Of course, I would still need a way to get the unitid of a unit being built though.

Also, rattle, I already do that for my buildings, which have antennas, rotating pieces, flashing lights, etc. So that way, you can tell if it is finished or not.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Yes, UNIT_BUILD_PERCENT_LEFT(unitID) will get you the info about how close to completion a unit is. It's not related to health btw, if the unit is damaged while being built, it can come out of factory with less than max HP (there is a FBI tag that controls that).
How you get the id of said unit is another matter. I'd probably try to find it by using your factory's pad piece (or whatever it's called, the one which the unit being built is attached to) XZ coordinates and then cycling throgh all the units and comparing their coordinates with that. This can be improved by also checking the Y coordinate (so the script won't occasionally pick a plane flying over the factory).
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Alright, thanks, hope I can get this to work. Never used the coordinates for something before.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

I've got a question concerning Upspring and 3do:
I have problems with the units I assembled and textured (the 3do way) in Upsring. While the unit itself works fine scriptwise I have problems with the textures. Some of them don't get recognized by Spring and instead there is a sort of "complilation" of all textures spring has. To show an extreme of this I have a picture (where I did something wrong which is why it completely shows the effect):
Image

Usually there are some textures right but some get replaced by this compilation texture. I for example took the Core Storm's legs and put another body on top. The legs still are textured in a correct way but only two or three textures of the body were right - the rest presents itself just as that ugly mixture. I then tried to texture it in the 3dobuilder and voilà now the textures are correct. Unfortunately the 3dobuilder ate some of the empty objects I put in to mark where the gunshots come from etc. and when I try to open the new model in Upsring it just crashes...

So is there a way to do 3do texturing in Upspring or do I have to completely rely on the 3dobuilder?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

The textures need to have the right name to show up correctly. Also, if you download 3dos with custom textures you need to port these over.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

Well I have only used the standard textures yet. I now also textured another model in 3dobuilder and the 3do opened fine in Upsring and even after saving it there the textures stayed correct ingame. So it seems that 3dobuilder is going to be my new best friend... :wink:
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Upspring and UV mapping tutorials should be your new best friends.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

rattle wrote:Upspring and UV mapping tutorials should be your new best friends.
Nah - I want to have a consistent look and as long I don't have all TA units done in a modern way I'll stay with the 3do style. Well I could convert my 3dos to s30s but that would be kinda memory waste imo...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

[Krogoth86] wrote:as long I don't have all TA units done in a modern way I'll stay with the 3do style.
Best way to make sure you'll never have all units done in s3o.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

KDR_11k wrote:Best way to make sure you'll never have all units done in s3o.
There's some truth in it but I want to make a game, not a graphics demo. Especially as I tend to remodel some new things I don't really like the texture mapping also would have been a waste of time - so maybe I'll think about that when the mod is finished (and Mr. D did a big part of my job already :mrgreen: )...

BTW - maybe two other points:
1.)
I have a problem with my Adv. Wind model:
Image
As you can see one face of the bottom left "foot" is missing and I don't really know why. I think it is a problem with Upspring (in which the model was assembled) yet again because when I look at it in 3dobuilder the following shows up:
Image
Only this faces has this pointed line when being selected and I don't really know how to change that. It's not as simple as to flip the face btw (it's shown correctly in the editors anyway). I call it a Upspring error because when I import the meshes in 3dobuilder the face has a normal outline when being selected though I haven't made proof of that yet in Spring...

2.)
So with the problem from 1.) I might tend to even assemble my models right in 3dobuilder but I haven't figured something out yet:
a) How to just move an object's origin?
b) When setting up empty points to mark positions for smoke to come out when firing, there's something wrong in Spring. The effect shows up but just pops up extremly short and is stretched along one axis. When trying to open a model with 3dobuilder objects in Upsring it crashes. When I take my 3dobuilder model and create the empty objects with Upspring everything works fine in Spring. Is there something to mind when doing those empty objects in 3dobuilder?
Locked

Return to “Game Development Tutorials & Resources”