Banbury
Members-
Posts
25 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Banbury
-
Just for the record: RND creates numbers between 0 and 1. The seed doesn't change that. (http://www.qb64.net/wiki/index.php?title=RND) So if the SemiMajorAxis is too big, it's a problem with your Math and not with the random number generator.
- 977 replies
-
- 1
-
- kerbal space program
- kopernicus
-
(and 1 more)
Tagged with:
-
You're misunderstanding how the random number generator works. RANDOMIZE only seeds the generator, which is a kind of initialization. The random numbers are generated by RND. How the seed is used to generate random numbers is based on the implementation. If you use a fixed seed, the same 'random' numbers are generated in the same order. The use of TIME just makes sure, that a different seed is used every time you start the program. But you only need a single seed. Calling RANDOMIZE TIME multiple times in a program is just a waste of space and resources. If you allow the user to set the seed at the beginning of your program, she can recreate a galaxy another user may have created with the same seed. Or you can create the same galaxy over and over again for testing.
- 977 replies
-
- 1
-
- kerbal space program
- kopernicus
-
(and 1 more)
Tagged with:
-
What @Mycroft said. Just wait, until your code is broken. You will wish, you have listened to me :). Finding a bug in unstructured code is a poodle. A seed is just some number. You use it with RANDOMIZE instead of TIMER. RANDOMIZE 12345678 That's why you should use RANDOMIZE only once at the beginning of your code. And you'll save 474 lines of code.
- 977 replies
-
- 1
-
- kerbal space program
- kopernicus
-
(and 1 more)
Tagged with:
-
8500 line of BASIC code! Now I feel nostalgic. A few hints for better structured code: Procedures can help you to avoid duplicated code. Every time you feel like copying and pasting code, make a procedure instead. You can simplify your name generator, by reading the name parts from a file into an array. Then select parts randomly from that array. Bonus point: Users can add new names, without recompiling your code. You don't have to call RANDOMIZE TIMER every time you use RND. Once at the beginning of the program is enough. By replacing TIMER with a seed number, you can recreate the same system. Great for testing. Never use GOTO. Ever!
- 977 replies
-
- 2
-
- kerbal space program
- kopernicus
-
(and 1 more)
Tagged with:
-
The only person bullied here is Khatarr. And I'm disappointed, that the mods allow these kind of behaviour.
-
I don't like the hardcoded keyboard shortcuts mods currently use. Too much risk for conflicts. I'm currently looking into a solution for key bindings for mods. I have made a good start, but it's a lot of work.
-
Toolbar buttons multiplying like rabbits
Banbury replied to Banbury's topic in KSP1 Technical Support (PC, modded installs)
Okay. I'm setting this to solved now. -
Toolbar buttons multiplying like rabbits
Banbury replied to Banbury's topic in KSP1 Technical Support (PC, modded installs)
I know exactly what point ferram is trying to make. But he's the one misunderstanding. I'm not looking for his help. I'm trying to help him find a bug in his mod. His response so far, was to treat me like a noob. Which I tried to ignore for the sake of a constructive discussion. If ferram wants to deny the bug, that's his problem not mine. The Find button is my own Part Search mod. I've fixed the problem in my mod on my own. -
Toolbar buttons multiplying like rabbits
Banbury replied to Banbury's topic in KSP1 Technical Support (PC, modded installs)
Please see the screenshot. And I'm running the latest versions of FAR and Kerbal Engineer. -
I have updated Part Search to version 1.3.0. Get it from Kerbal Stuff.
-
Toolbar buttons multiplying like rabbits
Banbury replied to Banbury's topic in KSP1 Technical Support (PC, modded installs)
I found and fixed the problem in PartSearch. The event handlers were no longer removed properly on exiting the VAB or the SPH. So the button got added over and over again. I guess FAR and Kerbal Engineer suffer from a similar problem. Though I can't reproduce it reliably. -
I have this odd problem, where the toolbar buttons are multiplying every time I switch between the VAB and the SPH. This new feature came with 0.25. As you can see, I have FAR, Kerbal Engineer (both updated) and my own PartSearch installed. I'm a little surprised, that nobody else seems to have this problem. Does anybody know, what causes this?
-
NaN Bug [0.24.2, Modded]
Banbury replied to KerTrotsky's topic in KSP1 Technical Support (PC, modded installs)
I have a savegame, that constantly crashes. After reading this thread, I opened it in a editor. And lo and behold there were multiple NaNs in there. I replaced them with 0. It still crashed, but I got some NaN in another place. This game has some serious issues. -
Thanks for pointing that out. That's a good reason for another version. I see, that PartCatalog has support for tags. Do mod authors use them?
-
I don't think Part Search has enough traction to make modders support it.
-
Possible? Everything's possible. The programming wouldn't be the hard part. Maintaining the tags would be a lot of continuous work, especially with mods. If anyone volunteers to keep the tags updated, then I'll add the feature.
-
Works for me. I'm not sure, when I'll make a new version. I want to see first, if it has any issues - esp. with 0.25.
-
Really Nice! Thanks! I will use it with the next release. And I'll add your name to the license text. But I'd need some license to fit with the MIT code. Creative Commons maybe?
-
Part Search 1.3.0 Part Search adds a quick search window to the Vehicle Assembly Building (VAB) and the Space Plane Hangar (SPH). When entering text in the search window, the addon searches for (partial) matches in the names and descriptions of vehicle parts. The parts window is filtered dynamically to only contain the matching parts. Finding those elusive landing gears is now just a matter of a few key presses. Download Kerbal Stuff Github Changes 1.3.0 (11.10.14) Now using PartListFilter for better compatibility with other mods. Fix for duplicated toolbar button. Nicer icon by CaptRobau. Category buttons are hidden when '∞' button is pressed. Part List is reset to first page when search text is changed. Text box gets focus when the search window is opened. 1.2.0 (03.10.14) GUI is now inside a window Window can be toggled via toolbar Support for KSP-AVC Installation Copy all the files to the GameData directory in your KSP installation. Usage After successful installation the the toolbars in the VAB and SPH display a new button named 'Find'. This button will toggle the search window on and off. The search window can be moved around freely. The addon remembers the last position of the window. The window contains a text field and two buttons. Clicking in the text field allows entering text. While typing the part window displays only the parts matching the search term. For example typing 'tank' will show all parts whose name or description contain the string tank (this includes partial matches). The button marked 'C' clears the contents of the textfield. When the '∞' button is clicked searches include all parts in all categories. Otherwise only the current category is searched. The category buttons will be hidden until the button is clicked again or the search window is closed. Notes If a search is started, while the part window is not on the first page, the search results might not be visible. Use the 'Previous Page' button to switch to the first page. If the search window is not visible when clicking the find button, try deleting the file PartSearch\PluginData\PartSearch\config.xml. This resets the window position. The game must be restarted to see the effect. Part Search might interfere with other addons, that manipulate the part window. Thanks to a hint by BlackNecro the latest version is now using PartListFilter, which should help with compatibility. Thanks CaptRobau for the pretty toolbar icon BlackNecro for the hint with the PartListFilter This mod was originally written by IcculusC.
-
I've made some changes to Part Search to improve the usability for my own use. If there's any interest, the changes are available in my own fork. Changes: GUI is now inside a window Window can be toggled via toolbar Support for KSP-AVC If you want to try it out, you can download a zipped version: Download I have asked the original author IcculusC for permission make an 'official' release as a matter of courtesy. If he gives permission or doesn't respond in a reasonable time, I'll release it to the Addon Releases board. Otherwise I'll release it under a new name.
-
I was trying to write a Java program targeting KRPC, but KSP blocked keyboard and mouse events to Eclipse (the Java IDE). I removed all mods and tried with different Java programs, but as long as KSP is running, GUI events are partially or completely blocked. Non-Java programs seem to be unaffected. KSP version: 0.24.2 OS: Windows 7 Home x64 Has anybody else noticed this? Is there a workaround? I had to give up on my program for the time being. It's rather unfortunate. I wanted to write a Java API for KRPC, that might have worked on Android, too.