OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: KyleSarnik on 15 Oct 2003, 02:10:26

Title: breifings...
Post by: KyleSarnik on 15 Oct 2003, 02:10:26
Allright, how do you center things in breifings, like a picture for example?... Yea yea I suck at HTMLs but who cares....
Title: Re:breifings...
Post by: B-2-0 on 15 Oct 2003, 03:30:24
 ;)

[p align="center"][img src="whateverulike.jpg" width="x" height="y"][/p]

Change the [ to < and ] to >

whateverulike.jpg = your picture
x and y = size of ur picture
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 04:03:08
Didn't work... It's still on the left... and how would you do text?
Title: Re:breifings...
Post by: macguba on 15 Oct 2003, 09:48:50
B-2-0 is right.   This is copied and pasted from a working Overview.html

<p align="center"><img src="overviewpicture.jpg" width="160" height="64"></p>

For text I presume its

<p align="center">this text is centred</p>
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 12:59:54
Yes I tried that but it doesn't work in breifing. I know it works in overveiw but I need to center my pictures and headings on one of the pages on my breifing... I know BIS did it in the 1985 campaign... But im away from my computer at the moment and can't take a look yet...
Title: Re:breifings...
Post by: dmakatra on 15 Oct 2003, 16:14:28
I suggest you DePBO a few missions and see how they did.

This is directly copied from one of my own missions. Works like a charm.

Code: [Select]
<h2><a name="November"></a>November 1 and 2</h2>
<h4>
<br>
November ones primary job is to transport Bravo Squad to Davle. November twos primary job is to transport Charlie and Delta Squads to Davle.<br>Each November Squad consists of:<br>
1x CH-47D(Chinook)<br>2x Pilots<br><br><p align="center"><img src="November.jpg" width="198" height="96">
<br>
<br>
Read More <A HREF="#Squads">Squad Information</A>
<br>
<br>
More <A HREF="#Detail">Detailed Orders</A>
</h4>
<hr>
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 20:39:43
armstrong yours works because of the size, my picture is a square (128x128), I could change the size of my picture though, but I still want to align some text and other pictures that can't be resized... I wonder tho, does it make a different wether or not its PBOed?
Title: Re:breifings...
Post by: dmakatra on 15 Oct 2003, 20:43:24
Hmmm... Try this:

<p align="center">Your text!<br>Now it's probably back to normal again?
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 20:51:40
ok when I double-click on the breifing HTML, it opens up and I can see that the picture is aligned... But not in the game...
Title: Re:breifings...
Post by: dmakatra on 15 Oct 2003, 20:55:40
attatch the briefing här.

:beat: *Gets Shot* :beat:

EDIT: Ah maen. You shouldn't be at one swedish forum and one internationall forum at the same time... :P

What I meant was:

Attatch the briefing here.
Title: Re:breifings...
Post by: Planck on 15 Oct 2003, 20:56:01
You could also try:

<p align=center>Your text!</p>

i.e.  No quotes around center


Planck
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 21:08:49
I allready tried it with out qoutes and like I said when I opened it as an HTML it was centered. Anyways I just finished resizing it, but Ill attach another one that uses a 64x64 square picture, and it just looks bad not centered, btw I didn't add <p align="center"> to it yet.
Title: Re:breifings...
Post by: Planck on 15 Oct 2003, 21:21:43
Hmmmm,,,,,,ok

Running your html, but changed the line:

<img src="Major1.jpg" width="64" height="64">

to:

<p align=center><img src="Major1.jpg" width="64" height="64"></p>


picture is now centered, but is it ingame???


Planck
Title: Re:breifings...
Post by: KyleSarnik on 15 Oct 2003, 21:38:39
Quote
btw I didn't add <p align="center"> to it yet.

I know how but I didn't put it there yet because I was too busy trying to fix the other one. And it doesn't work ingame.... Can anyone attach an HTML file with a picture thats centered and works ingame? Maybe it's just my OFP...
Title: Re:breifings...
Post by: KyleSarnik on 16 Oct 2003, 01:42:44
Strange... it all works as an HTML, but not ingame....  >:(
Title: Re:breifings...
Post by: Sui on 16 Oct 2003, 02:04:32
The way OFP reads HTML isn't the same way your browser/HTML editor reads it...

Sometimes redundant HTML code (like program identifiers) can stuff things up and confuse OFP.

I can't recall who it was, but someone threw me over a briefing a while ago with similar problems. The formatting commands wouldn't work.
It turned out they were using M$ frontpage, which was adding in a lot of M$ crap, which was making OFP ignore the formatting commands.

I suggest you learn some basic HTML, and edit the source rather than using an editor. It's not nearly as hard as it sounds ;)
Title: Re:breifings...
Post by: KyleSarnik on 16 Oct 2003, 02:29:40
erm sorry if I made it seem that way but I didn't use an HTML editor, just notepad... I copy/pasted breifings I did from previous missions (alot easier than re-writing them all) and it worked in the overviews but not in the breifings... I did attach the HTML and the picture.... if anyone wants to take a look...

http://www.ofpec.com/yabbse/attachments/breifing_and_pic.zip
Title: Re:breifings...
Post by: Homefry31464 on 16 Oct 2003, 02:56:25
Does OFP recognize normal tags like "<center>"??
Title: Re:breifings...
Post by: Sui on 17 Oct 2003, 02:29:42
oh... sorry Kyle, I guess assumption is still the mother of all..  :-X ;)

Just taking a look at your briefing, I think it has to do with all the spaces you've got in there. The html code for an empty line is:

<p>&nbsp;</p>

Try replacing all those empty lines with that and see if OFP starts to recognize the formatting...

Homefry...

The code I use to center stuff looks like:

<h2 align="center"><a name="Debriefing:End1">Mission Accomplished</a></h2>

The only HTML I know is 'OFP HTML', so I'm not sure if that's 100% correct or not ;)
Title: Re:breifings...
Post by: KyleSarnik on 17 Oct 2003, 02:37:08
Sui:

do you mean the spaced between notes, plan, objectives, etc? Well I'll try it later, right now I'm kind of busy... Anyways I will let you know if it works or not...
Title: Re:breifings...
Post by: KyleSarnik on 17 Oct 2003, 21:20:17
Oh wait do you mean that in place of <br>?? I will try it...
Title: Re:breifings...
Post by: KyleSarnik on 17 Oct 2003, 21:30:03
Nope, does nothing... Does it have anything to do with running version 1.94??
Title: Re:breifings...
Post by: Planck on 17 Oct 2003, 21:47:06
Kyle

Try this version of your briefing.

The picture is centered in-game, at least it is on my machine.

btw.......I am running 1.94 as well.



Planck
Title: Re:breifings...
Post by: KyleSarnik on 17 Oct 2003, 23:43:01
Thank you very very much now I can just copy/past it from that into all of my breifings because it doesn't work on my comp unless someone does it on theirs first.... Really really odd...