Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Eclipse++


Marsh
 Share

Recommended Posts

  • Replies 556
  • Created
  • Last Reply

Top Posters In This Topic

@Marsh:

> Not sure yet, though if it is it would have some restrictions so that you cannot make your own engine out of it only a game or to learn. As i dont want a ton of c++ engines suddenly popping up.

yeah i see your concern but it would suck for serious hobbyists to not have open source.
If you beleive its worth it then just do up a real nice license for it.
Maybe even pay for open source… I paid for Realm crafter and wouldnt mind paying for a good one if you made it.
Link to comment
Share on other sites

@Marsh:

> Not sure yet, though if it is it would have some restrictions so that you cannot make your own engine out of it only a game or to learn. As i dont want a ton of c++ engines suddenly popping up.

I just want to have a look at how it's done and if I did try to steal it and make an edit it would suck anyway. :p
Link to comment
Share on other sites

Nothing special just getting the Player Editor out of the way. This doesn't mean this is all the stats / info they will have just doing some of the grunt work that needs to be done since all the editors i am making externally. Just reads and writes to a file, not even needed just makes it a bit more user friendly.

![](http://www.freemmorpgmaker.com/files/imagehost/pics/49d0a00fcdb891882c261e8d227ec53e.png)
Link to comment
Share on other sites

@Dezire:

> And the whole C++ engines crap, you should just have a sell the source for a decent price.

I am not sure if you can actually do something like that. Depending on the libraries used, you're bound to several things like (commercial) licenses and royalties, which can be a pain. Like, for instance, when linking a (L)GPL library as static, it forces your application to become open source. Ignoring that, if I'd sell the source, I'd sell it with actual licensing, so people can't claim it to be their creation and such things.

Regards,
  Godlord.
Link to comment
Share on other sites

Marsh, I know this is offtopic, but I need to talk to you, and PMs are good enough for me. XD Next time you're on MSN give me a message, don't matter what status I am, as long as I'm some kind of Online, give me a message.

Anyways, you should try to market the source, if not, eventually get down to writing your own libraries, you know?
Link to comment
Share on other sites

yeah, if I don't catch you on in a few weeks, I'll give you a pm, along with(possibly) a beta of my engine, if it comes along good enough.  Hoping it's gonna be ready for testing shortly, and it's in VB.NET, so I'm thinking about if you want to, to allow me to release my engine as Eclipse.NET :D lol.

I'll talk to you more about it in MSN, or PMs or something.
Link to comment
Share on other sites

Yea well talk about it, sounds promising.

[Edit]

More grunt work out of the way. Most of these are not in Eclipse++ yet. Just saves me the time of going back and editing it later. Now i dont have to remember what every random line of the text file is. Yes i am aware that it is a sword with the item type shield :P, im not actually using the item just put in some random values.

Nothing fancy just gets the job done.
![](http://www.freemmorpgmaker.com/files/imagehost/pics/a41a83f270d32323d894ed480c9299a1.png)
Link to comment
Share on other sites

Yea thats a good idea. May do it later would be handy for quest items etc.

Here is the source for the item editor. Not really needed as it is pretty simple but if anyone wants to know how to read and write from input boxes etc. Maybe Godlord will come along and point out all the discrepancies in the code. Yes i know i should have used a Case statement instead of a if for the rarity :P.

Looks like alot of code but alot of it is done for you with the Visual project Editor. When you put it into Visual C++ Windows Form project then reload the form all the input boxes etc will show up for easy editing. You just need to use the code in the actual buttons.
```
#pragma once
#include #include #include namespace ItemEditor {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace std;
using namespace Runtime::InteropServices;

const char* account2;
/// /// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
///          'Resource File Name' property for the managed resource compiler tool
///          associated with all .resx files this class depends on.  Otherwise,
///          the designers will not be able to interact properly with localized
///          resources associated with this form.
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}

protected:
/// /// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::RadioButton^  Rare;
protected:
private: System::Windows::Forms::RadioButton^  Uncommon;
private: System::Windows::Forms::RadioButton^  Common;
private: System::Windows::Forms::ComboBox^  Wep;
private: System::Windows::Forms::Label^  label9;
private: System::Windows::Forms::Label^  label10;
private: System::Windows::Forms::TextBox^  LevelR;
private: System::Windows::Forms::Label^  label13;
private: System::Windows::Forms::TextBox^  Defence;

private: System::Windows::Forms::Label^  label1;
private: System::Windows::Forms::TextBox^  ExpBonus;
private: System::Windows::Forms::Label^  label3;
private: System::Windows::Forms::Button^  Open;
private: System::Windows::Forms::TextBox^  SpeedBonus;
private: System::Windows::Forms::Label^  asdfe;
private: System::Windows::Forms::TextBox^  MagicBonus;
private: System::Windows::Forms::Label^  label16;
private: System::Windows::Forms::TextBox^  HealthBonus;
private: System::Windows::Forms::Label^  label17;
private: System::Windows::Forms::Button^  Reload;
private: System::Windows::Forms::TextBox^  StrBonus;
private: System::Windows::Forms::TextBox^  MagR;
private: System::Windows::Forms::Label^  label11;
private: System::Windows::Forms::Label^  label12;
private: System::Windows::Forms::TextBox^  DefR;
private: System::Windows::Forms::Label^  label5;
private: System::Windows::Forms::TextBox^  StrR;
private: System::Windows::Forms::TextBox^  Sprite;
private: System::Windows::Forms::TextBox^  Description;
private: System::Windows::Forms::Label^  label6;
private: System::Windows::Forms::Label^  label7;
private: System::Windows::Forms::Label^  label8;
private: System::Windows::Forms::TextBox^  Name;
private: System::Windows::Forms::Label^  label2;
private: System::Windows::Forms::Button^  Save;
private: System::Windows::Forms::OpenFileDialog^  openFileDialog1;

private:
/// /// Required designer variable.
///

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
/// /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
this->Rare = (gcnew System::Windows::Forms::RadioButton());
this->Uncommon = (gcnew System::Windows::Forms::RadioButton());
this->Common = (gcnew System::Windows::Forms::RadioButton());
this->Wep = (gcnew System::Windows::Forms::ComboBox());
this->label9 = (gcnew System::Windows::Forms::Label());
this->label10 = (gcnew System::Windows::Forms::Label());
this->LevelR = (gcnew System::Windows::Forms::TextBox());
this->label13 = (gcnew System::Windows::Forms::Label());
this->Defence = (gcnew System::Windows::Forms::TextBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->ExpBonus = (gcnew System::Windows::Forms::TextBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->Open = (gcnew System::Windows::Forms::Button());
this->SpeedBonus = (gcnew System::Windows::Forms::TextBox());
this->asdfe = (gcnew System::Windows::Forms::Label());
this->MagicBonus = (gcnew System::Windows::Forms::TextBox());
this->label16 = (gcnew System::Windows::Forms::Label());
this->HealthBonus = (gcnew System::Windows::Forms::TextBox());
this->label17 = (gcnew System::Windows::Forms::Label());
this->Reload = (gcnew System::Windows::Forms::Button());
this->StrBonus = (gcnew System::Windows::Forms::TextBox());
this->MagR = (gcnew System::Windows::Forms::TextBox());
this->label11 = (gcnew System::Windows::Forms::Label());
this->label12 = (gcnew System::Windows::Forms::Label());
this->DefR = (gcnew System::Windows::Forms::TextBox());
this->label5 = (gcnew System::Windows::Forms::Label());
this->StrR = (gcnew System::Windows::Forms::TextBox());
this->Sprite = (gcnew System::Windows::Forms::TextBox());
this->Description = (gcnew System::Windows::Forms::TextBox());
this->label6 = (gcnew System::Windows::Forms::Label());
this->label7 = (gcnew System::Windows::Forms::Label());
this->label8 = (gcnew System::Windows::Forms::Label());
this->Name = (gcnew System::Windows::Forms::TextBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->Save = (gcnew System::Windows::Forms::Button());
this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
this->SuspendLayout();
//
// Rare
//
this->Rare->AutoSize = true;
this->Rare->ForeColor = System::Drawing::Color::Red;
this->Rare->Location = System::Drawing::Point(282, 415);
this->Rare->Name = L"Rare";
this->Rare->Size = System::Drawing::Size(48, 17);
this->Rare->TabIndex = 126;
this->Rare->Text = L"Rare";
this->Rare->UseVisualStyleBackColor = true;
//
// Uncommon
//
this->Uncommon->AutoSize = true;
this->Uncommon->ForeColor = System::Drawing::Color::Blue;
this->Uncommon->Location = System::Drawing::Point(184, 415);
this->Uncommon->Name = L"Uncommon";
this->Uncommon->Size = System::Drawing::Size(79, 17);
this->Uncommon->TabIndex = 125;
this->Uncommon->Text = L"Uncommon";
this->Uncommon->UseVisualStyleBackColor = true;
//
// Common
//
this->Common->AutoSize = true;
this->Common->Location = System::Drawing::Point(102, 415);
this->Common->Name = L"Common";
this->Common->Size = System::Drawing::Size(66, 17);
this->Common->TabIndex = 124;
this->Common->Text = L"Common";
this->Common->UseVisualStyleBackColor = true;
//
// Wep
//
this->Wep->FormattingEnabled = true;
this->Wep->Items->AddRange(gcnew cli::array< System::Object^  >(10) {L"Weapon", L"Shield", L"Boots", L"Cape", L"Ring", L"Necklace",
L"Pants", L"Helmet", L"Gloves", L"Tool"});
this->Wep->Location = System::Drawing::Point(102, 386);
this->Wep->Name = L"Wep";
this->Wep->Size = System::Drawing::Size(231, 21);
this->Wep->TabIndex = 123;
//
// label9
//
this->label9->AutoSize = true;
this->label9->Location = System::Drawing::Point(9, 415);
this->label9->Name = L"label9";
this->label9->Size = System::Drawing::Size(37, 13);
this->label9->TabIndex = 122;
this->label9->Text = L"Rarity:";
//
// label10
//
this->label10->AutoSize = true;
this->label10->Location = System::Drawing::Point(9, 389);
this->label10->Name = L"label10";
this->label10->Size = System::Drawing::Size(78, 13);
this->label10->TabIndex = 121;
this->label10->Text = L"Weapon Type:";
//
// LevelR
//
this->LevelR->Location = System::Drawing::Point(102, 360);
this->LevelR->Name = L"LevelR";
this->LevelR->Size = System::Drawing::Size(231, 20);
this->LevelR->TabIndex = 120;
//
// label13
//
this->label13->AutoSize = true;
this->label13->Location = System::Drawing::Point(9, 363);
this->label13->Name = L"label13";
this->label13->Size = System::Drawing::Size(93, 13);
this->label13->TabIndex = 119;
this->label13->Text = L"Level Requirment:";
//
// Defence
//
this->Defence->Location = System::Drawing::Point(102, 331);
this->Defence->Name = L"Defence";
this->Defence->Size = System::Drawing::Size(231, 20);
this->Defence->TabIndex = 118;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(9, 334);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(51, 13);
this->label1->TabIndex = 117;
this->label1->Text = L"Defence:";
//
// ExpBonus
//
this->ExpBonus->Location = System::Drawing::Point(102, 305);
this->ExpBonus->Name = L"ExpBonus";
this->ExpBonus->Size = System::Drawing::Size(231, 20);
this->ExpBonus->TabIndex = 116;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(9, 308);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(96, 13);
this->label3->TabIndex = 115;
this->label3->Text = L"Experience Bonus:";
//
// Open
//
this->Open->Location = System::Drawing::Point(11, 7);
this->Open->Name = L"Open";
this->Open->Size = System::Drawing::Size(75, 23);
this->Open->TabIndex = 114;
this->Open->Text = L"Open";
this->Open->UseVisualStyleBackColor = true;
this->Open->Click += gcnew System::EventHandler(this, &Form1::Open_Click);
//
// SpeedBonus
//
this->SpeedBonus->Location = System::Drawing::Point(102, 279);
this->SpeedBonus->Name = L"SpeedBonus";
this->SpeedBonus->Size = System::Drawing::Size(231, 20);
this->SpeedBonus->TabIndex = 113;
//
// asdfe
//
this->asdfe->AutoSize = true;
this->asdfe->Location = System::Drawing::Point(9, 282);
this->asdfe->Name = L"asdfe";
this->asdfe->Size = System::Drawing::Size(74, 13);
this->asdfe->TabIndex = 112;
this->asdfe->Text = L"Speed Bonus:";
//
// MagicBonus
//
this->MagicBonus->Location = System::Drawing::Point(102, 225);
this->MagicBonus->Name = L"MagicBonus";
this->MagicBonus->Size = System::Drawing::Size(231, 20);
this->MagicBonus->TabIndex = 111;
//
// label16
//
this->label16->AutoSize = true;
this->label16->Location = System::Drawing::Point(9, 228);
this->label16->Name = L"label16";
this->label16->Size = System::Drawing::Size(72, 13);
this->label16->TabIndex = 110;
this->label16->Text = L"Magic Bonus:";
//
// HealthBonus
//
this->HealthBonus->Location = System::Drawing::Point(102, 199);
this->HealthBonus->Name = L"HealthBonus";
this->HealthBonus->Size = System::Drawing::Size(231, 20);
this->HealthBonus->TabIndex = 109;
//
// label17
//
this->label17->AutoSize = true;
this->label17->Location = System::Drawing::Point(9, 202);
this->label17->Name = L"label17";
this->label17->Size = System::Drawing::Size(74, 13);
this->label17->TabIndex = 108;
this->label17->Text = L"Health Bonus:";
//
// Reload
//
this->Reload->Location = System::Drawing::Point(129, 7);
this->Reload->Name = L"Reload";
this->Reload->Size = System::Drawing::Size(75, 23);
this->Reload->TabIndex = 107;
this->Reload->Text = L"Reset";
this->Reload->UseVisualStyleBackColor = true;
this->Reload->Click += gcnew System::EventHandler(this, &Form1::Reload_Click);
//
// StrBonus
//
this->StrBonus->Location = System::Drawing::Point(102, 253);
this->StrBonus->Name = L"StrBonus";
this->StrBonus->Size = System::Drawing::Size(231, 20);
this->StrBonus->TabIndex = 106;
//
// MagR
//
this->MagR->Location = System::Drawing::Point(102, 173);
this->MagR->Name = L"MagR";
this->MagR->Size = System::Drawing::Size(231, 20);
this->MagR->TabIndex = 105;
//
// label11
//
this->label11->AutoSize = true;
this->label11->Location = System::Drawing::Point(9, 256);
this->label11->Name = L"label11";
this->label11->Size = System::Drawing::Size(83, 13);
this->label11->TabIndex = 104;
this->label11->Text = L"Strength Bonus:";
//
// label12
//
this->label12->AutoSize = true;
this->label12->Location = System::Drawing::Point(9, 176);
this->label12->Name = L"label12";
this->label12->Size = System::Drawing::Size(54, 13);
this->label12->TabIndex = 103;
this->label12->Text = L"Mag Req:";
//
// DefR
//
this->DefR->Location = System::Drawing::Point(102, 147);
this->DefR->Name = L"DefR";
this->DefR->Size = System::Drawing::Size(231, 20);
this->DefR->TabIndex = 102;
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(9, 150);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(50, 13);
this->label5->TabIndex = 101;
this->label5->Text = L"Def Req:";
//
// StrR
//
this->StrR->Location = System::Drawing::Point(102, 121);
this->StrR->Name = L"StrR";
this->StrR->Size = System::Drawing::Size(231, 20);
this->StrR->TabIndex = 100;
//
// Sprite
//
this->Sprite->Location = System::Drawing::Point(102, 95);
this->Sprite->Name = L"Sprite";
this->Sprite->Size = System::Drawing::Size(231, 20);
this->Sprite->TabIndex = 99;
//
// Description
//
this->Description->Location = System::Drawing::Point(102, 68);
this->Description->Name = L"Description";
this->Description->Size = System::Drawing::Size(231, 20);
this->Description->TabIndex = 98;
//
// label6
//
this->label6->AutoSize = true;
this->label6->Location = System::Drawing::Point(9, 124);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(73, 13);
this->label6->TabIndex = 97;
this->label6->Text = L"Strength Req:";
//
// label7
//
this->label7->AutoSize = true;
this->label7->Location = System::Drawing::Point(9, 98);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(60, 13);
this->label7->TabIndex = 96;
this->label7->Text = L"Item Sprite:";
//
// label8
//
this->label8->AutoSize = true;
this->label8->Location = System::Drawing::Point(9, 71);
this->label8->Name = L"label8";
this->label8->Size = System::Drawing::Size(63, 13);
this->label8->TabIndex = 95;
this->label8->Text = L"Description:";
//
// Name
//
this->Name->Location = System::Drawing::Point(102, 42);
this->Name->Name = L"Name";
this->Name->Size = System::Drawing::Size(231, 20);
this->Name->TabIndex = 94;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(9, 45);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(61, 13);
this->label2->TabIndex = 93;
this->label2->Text = L"Item Name:";
//
// Save
//
this->Save->Location = System::Drawing::Point(255, 7);
this->Save->Name = L"Save";
this->Save->Size = System::Drawing::Size(75, 23);
this->Save->TabIndex = 92;
this->Save->Text = L"Save";
this->Save->UseVisualStyleBackColor = true;
this->Save->Click += gcnew System::EventHandler(this, &Form1::Save_Click);
//
// openFileDialog1
//
this->openFileDialog1->FileName = L"openFileDialog1";
this->openFileDialog1->Filter = L"Text files (*.txt)|*.txt";
this->openFileDialog1->InitialDirectory = L"CurrentDirectory";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(344, 442);
this->Controls->Add(this->Rare);
this->Controls->Add(this->Uncommon);
this->Controls->Add(this->Common);
this->Controls->Add(this->Wep);
this->Controls->Add(this->label9);
this->Controls->Add(this->label10);
this->Controls->Add(this->LevelR);
this->Controls->Add(this->label13);
this->Controls->Add(this->Defence);
this->Controls->Add(this->label1);
this->Controls->Add(this->ExpBonus);
this->Controls->Add(this->label3);
this->Controls->Add(this->Open);
this->Controls->Add(this->SpeedBonus);
this->Controls->Add(this->asdfe);
this->Controls->Add(this->MagicBonus);
this->Controls->Add(this->label16);
this->Controls->Add(this->HealthBonus);
this->Controls->Add(this->label17);
this->Controls->Add(this->Reload);
this->Controls->Add(this->StrBonus);
this->Controls->Add(this->MagR);
this->Controls->Add(this->label11);
this->Controls->Add(this->label12);
this->Controls->Add(this->DefR);
this->Controls->Add(this->label5);
this->Controls->Add(this->StrR);
this->Controls->Add(this->Sprite);
this->Controls->Add(this->Description);
this->Controls->Add(this->label6);
this->Controls->Add(this->label7);
this->Controls->Add(this->label8);
this->Controls->Add(this->Name);
this->Controls->Add(this->label2);
this->Controls->Add(this->Save);
// this->Name = L"Form1";
this->Text = L"Eclipse++ Item Editor";
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion
private: System::Void Open_Click(System::Object^  sender, System::EventArgs^  e)

{

openFileDialog1->ShowDialog();

String^ account = openFileDialog1->FileName;

string  IName, IDesc, ISprite, IStrR, IDefR, IMagR, IHealthB, IMagB, IStrB, ISpeedB, IExpB, IDef, ILevelR, IWepType, IRare;
int invcount, loopnum;
loopnum = 0; invcount = 0;

account2 = (const char*)(Marshal::StringToHGlobalAnsi(account)).ToPointer();

  string line;
  ifstream myfile (account2);
  if (myfile.is_open())
  {
while (! myfile.eof() )
{
  getline (myfile,line);

if (loopnum == 0)
{
IName = line;
}

if (loopnum == 1)
{
IDesc = line;
}

if (loopnum == 2)
{
ISprite = line;
}

if (loopnum == 3)
{
IStrR = line;
}

if (loopnum == 4)
{
IDefR = line;
}

if (loopnum == 5)
{
IMagR = line;
}

if (loopnum == 6)
{
IHealthB = line;
}

if (loopnum == 7)
{
IMagB = line;
}

if (loopnum == 8)
{
IStrB = line;
}

if (loopnum == 9)
{
ISpeedB = line;
}

if (loopnum == 10)
{
IExpB = line;
}

if (loopnum == 11)
{
IDef = line;
}

if (loopnum == 12)
{
ILevelR = line;
}

if (loopnum == 13)
{
IWepType = line;
}

if (loopnum == 14)
{
IRare = line;
}

loopnum++;
}

loopnum = 0;
myfile.close();
  }

  else

  {
MessageBox::Show( "Failed to open File.", "Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
  }

Name->Text = gcnew String(IName.c_str());
Description->Text = gcnew String(IDesc.c_str());
Sprite->Text = gcnew String(ISprite.c_str());
StrR->Text = gcnew String(IStrR.c_str());
DefR->Text = gcnew String(IDefR.c_str());
MagR->Text = gcnew String(IMagR.c_str());
HealthBonus->Text = gcnew String(IHealthB.c_str());
MagicBonus->Text = gcnew String(IMagB.c_str());
StrBonus->Text = gcnew String(IStrB.c_str());
SpeedBonus->Text = gcnew String(ISpeedB.c_str());
ExpBonus->Text = gcnew String(IExpB.c_str());
Defence->Text = gcnew String(IDef.c_str());
LevelR->Text = gcnew String(ILevelR.c_str());
Wep->Text = gcnew String(IWepType.c_str());

if (IRare == "1")
{
Common->Checked = true;
}

if (IRare == "2")
{
Uncommon->Checked = true;
}

if (IRare == "3")
{
Rare->Checked = true;
}

if (IRare != "1" && IRare != "2" && IRare != "3")
{
MessageBox::Show( "Your Item File is incorrectly Formatted. Rarity is invalid value.", "Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
}

}
private: System::Void Reload_Click(System::Object^  sender, System::EventArgs^  e)

{

String^ account = openFileDialog1->FileName;

string  IName, IDesc, ISprite, IStrR, IDefR, IMagR, IHealthB, IMagB, IStrB, ISpeedB, IExpB, IDef, ILevelR, IWepType, IRare;
int invcount, loopnum;
loopnum = 0; invcount = 0;

account2 = (const char*)(Marshal::StringToHGlobalAnsi(account)).ToPointer();

  string line;
  ifstream myfile (account2);
  if (myfile.is_open())
  {
while (! myfile.eof() )
{
  getline (myfile,line);

if (loopnum == 0)
{
IName = line;
}

if (loopnum == 1)
{
IDesc = line;
}

if (loopnum == 2)
{
ISprite = line;
}

if (loopnum == 3)
{
IStrR = line;
}

if (loopnum == 4)
{
IDefR = line;
}

if (loopnum == 5)
{
IMagR = line;
}

if (loopnum == 6)
{
IHealthB = line;
}

if (loopnum == 7)
{
IMagB = line;
}

if (loopnum == 8)
{
IStrB = line;
}

if (loopnum == 9)
{
ISpeedB = line;
}

if (loopnum == 10)
{
IExpB = line;
}

if (loopnum == 11)
{
IDef = line;
}

if (loopnum == 12)
{
ILevelR = line;
}

if (loopnum == 13)
{
IWepType = line;
}

if (loopnum == 14)
{
IRare = line;
}

loopnum++;
}

loopnum = 0;
myfile.close();
  }

  else

  {
MessageBox::Show( "Failed to open File.", "Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
  }

Name->Text = gcnew String(IName.c_str());
Description->Text = gcnew String(IDesc.c_str());
Sprite->Text = gcnew String(ISprite.c_str());
StrR->Text = gcnew String(IStrR.c_str());
DefR->Text = gcnew String(IDefR.c_str());
MagR->Text = gcnew String(IMagR.c_str());
HealthBonus->Text = gcnew String(IHealthB.c_str());
MagicBonus->Text = gcnew String(IMagB.c_str());
StrBonus->Text = gcnew String(IStrB.c_str());
SpeedBonus->Text = gcnew String(ISpeedB.c_str());
ExpBonus->Text = gcnew String(IExpB.c_str());
Defence->Text = gcnew String(IDef.c_str());
LevelR->Text = gcnew String(ILevelR.c_str());
Wep->Text = gcnew String(IWepType.c_str());

if (IRare == "1")
{
Common->Checked = true;
}

if (IRare == "2")
{
Uncommon->Checked = true;
}

if (IRare == "3")
{
Rare->Checked = true;
}

if (IRare != "1" && IRare != "2" && IRare != "3")
{
MessageBox::Show( "Your Item File is incorrectly Formatted. Rarity is invalid value.", "Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
}

}
private: System::Void Save_Click(System::Object^  sender, System::EventArgs^  e)

{

ofstream myfile2;
  myfile2.open (account2);

  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(Name->Text)).ToPointer() << "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(Description->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(Sprite->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(StrR->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(DefR->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(MagR->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(HealthBonus->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(MagicBonus->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(StrBonus->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(SpeedBonus->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(ExpBonus->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(Defence->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(LevelR->Text)).ToPointer()<< "\n";
  myfile2 << (const char*)(Marshal::StringToHGlobalAnsi(Wep->Text)).ToPointer()<< "\n";

if (Common->Checked == true)
{
myfile2 << "1" << "\n";
}

if (Uncommon->Checked == true)
{
myfile2 << "2" << "\n";
}

if (Rare->Checked == true)
{
myfile2 << "3" << "\n";
}

if (Common->Checked != true && Uncommon->Checked != true && Rare->Checked != true)
{
MessageBox::Show( "Your Item Rarity is not checked properly. Rarity is invalid value. File was saved but there may be errors.", "Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation );
}

myfile2.close();

}
};
}

```
Link to comment
Share on other sites

@Marsh:

> Yea well talk about it, sounds promising.
>
> [Edit]
>
> More grunt work out of the way. Most of these are not in Eclipse++ yet. Just saves me the time of going back and editing it later. Now i dont have to remember what every random line of the text file is. Yes i am aware that it is a sword with the item type shield :P, im not actually using the item just put in some random values.
>
> Nothing fancy just gets the job done.
> ![](http://www.freemmorpgmaker.com/files/imagehost/pics/a41a83f270d32323d894ed480c9299a1.png)

very nice.
if i never start project, this will be one "quick" tool for me.
Link to comment
Share on other sites

This is going to be awesome now that I know some C++! You have my full support, and I'm willing to help out if you want.

I didn't check all of the replies to see if someone had already done this, but here's a draft of a gui for your map editor.
[http://www.freemmorpgmaker.com/files/imagehost/pics/1e7c4b457dc1726c8506179487ba3733.png](http://www.freemmorpgmaker.com/files/imagehost/#1e7c4b457dc1726c8506179487ba3733.png)
It isn't great, but it's clean and I used your image of the map editor to make it, so it should fit well. If there's anything you would like me to change, please ask.
Link to comment
Share on other sites

Yea thanks Xavi, i may use it considering my current one is basically just blank boxes.

Just posting another editor, its pretty damn simple after the first one is made so it dont take long. As i said earlier just getting the grunt work out of the way. I have to make the editors eventually. Again this is not the final settings that npcs will have. Just some of the options. The last 3 options arent programmed into the engine yet. Just shows some work is being done no matter how small it may be.

![](http://www.freemmorpgmaker.com/files/imagehost/pics/5c2b0ce4c68bf7e6a371e70fdb6ba5a4.png)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...