Eoc modding newbie question

More
18 years 5 months ago #14391 by Cormorant
I've made progress! :D

First of all, I've simplified everything by putting everything into the Main function and abandonning the MainTask again (the MainTask was one of my previous attempts to change at least SOMETHING, but anyhow...)
Looking at this simple script, I have noticed a real foolish mistake: Noticed the comsec_prefitted.ini? It is supposed to have NO ini-extension, but it had one. I removed the extension, and now my player ship is created (no "No player ship" debug message and no "Story didn't give the player a ship" message in the flux.log!)
However, here we go with new problems. When I launch the script, I can see the sky of Dagda again, but this time with a small player cockpit model slightly to the left of the center of the screen, obviously a few metres away from the camera. Apart from this wierd point of view, there's still no HUD, and still obviously no control of the ship. However, I can switch through the camera views - removing the cockpit view by pressing F1 removes the strange cockpit, and switching to external cameras seems to flood the whole screen with red light.
However, there is no player ship model - I can rotate the external camera around a fixed point somewhere in a reddish Dagda-system and switch back to the usual cockpit camera again to remove the red lighting effect.
I might be stuck in a star or something. The flux.log still shows up my "Star not found!" message, which indicated that something must be wrong about my definition of the star I tried to place the player relative to. The red light ín external camera view seems to support the theory that I am stuck in the exact center of the system, inside the star, but that still doesn't explain the strange cockpit view and the fact that there seems to be no player ship model. Remember, I am using the usual pre-defined comsec with prefitted loadout that is supposed to work with the game.

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14392 by GrandpaTrout
Yay! I have made that mistake many time. And totally missed it looking at your code.

I would not place the player into the ship until the ship has been placed into the system (no facts to back that up, it is just the way I do it). And if you are placing ships near stars - make the ship invulnerable before using the PlaceNear. Just to be sure if it ends up in the middle of a star it does not get destroyed.
iSim.SetIndestructable(ship, true)

On thing you can do is open the map screen and see where you are. And see if the objects you placed into your star system exist.

Edit: If you try to place near an object that does not exist, you get placed at the center of the star system.

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14394 by Cormorant
Still no luck. None of those worked, I'm afraid. When I try to call up the HUD menu using the arrow keys, I can see no HUD interface, but hear the clicks indicating that I am just navigating around the menu. I tried to call up the starmap blindly (i.e. typing in the according arrow key combination that should call it up if the menu was visible), which finally caused the game to crash. Obviously, my script doesn't like the starmap, which might have something to do with the star not found properly.
I even tried to set the star incullable, but still no luck. I'm still getting my "star not declared" message. I suppose I should focus on the declaration of the star now, but I couldn't find any problems - not even typos.[:(]

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14395 by GrandpaTrout
Are you still using the standard Dagda system? If so, use this station instead of the star:
Code:
Dagda Delta 3 MAAS Waystation

One thing to know about is that POG does not use the text name of objects. It always uses the Keyname. You can find the keynames by printing them to the debug log. or you can read them out of the text.csv files. You can never trust the names that appear on the HUD.

If you are using the standard Hoffers Wake, then pick a station out of that system. Your right in assuming that the script is not going to work until you can find a valid object to place your ship near. Here is the player base:
Code:
Lucrecia's Base

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14396 by mdvalley
You don’t suppose the capital D in “map:/geog/badlands/Dagda� makes a difference? Wouldn’t surprise me if that D made it not find the system.

Please Log in or Create an account to join the conversation.

More
18 years 5 months ago #14397 by Cormorant
MWUUAAAAHAARRHARRHARRHARR!!! HARR! harr... ehm... What I was trying to say is: I made it! I am inside the comsec, I can control the comsec, I have a HUD, I can call up the starmap, I can navigate around Dagda, in other words: It works!

Now what was the problem?

I've had another close look at PS' training ring scenario and realized they had used FindByName instead of FindByNameInSystem, which I had ripped from EricMan's mission tutorial. This made sense to me, as the tutorial was placed in a whole game environment, while in my scenario, I had already defined the starting system before. Obviously, calling the same system map twice in a script is a big NO.
It just makes me wonder how that issue can be handled when you want a script to find a map object and are not sure which system the player is currently in... But that's another question for another day.
For now, once again I see what I like about scripting so much: If someting goes wrong, you can be absolutely sure that is your very own fault ;) Thanks to all of you for your efforts - I suppose I've already learned a lot for future scripting issues in this thread.

peace

Edit: Oh, it was indeed because of the capital D. I saw your message after posting, realized I had overlooked this typo over and over again and tried it with FindByNameInSystem again - this time with a small d. And it worked. I could cry [xx(]

Please Log in or Create an account to join the conversation.